Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
6c9838a5
Commit
6c9838a5
authored
Jan 01, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: other rename+move went well, finish up
parent
3941c468
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
FirmwareController.php
.../app/controllers/OPNsense/Core/Api/FirmwareController.php
+1
-1
check.sh
src/opnsense/scripts/firmware/check.sh
+2
-5
actions_firmware.conf
src/opnsense/service/conf/actions.d/actions_firmware.conf
+2
-2
system_information.widget.php
src/www/widgets/widgets/system_information.widget.php
+1
-1
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php
View file @
6c9838a5
...
...
@@ -47,7 +47,7 @@ class FirmwareController extends ApiControllerBase
{
$this
->
sessionClose
();
// long running action, close session
$backend
=
new
Backend
();
$response
=
json_decode
(
trim
(
$backend
->
configdRun
(
'firmware
pkgstatus
'
)),
true
);
$response
=
json_decode
(
trim
(
$backend
->
configdRun
(
'firmware
check
'
)),
true
);
if
(
$response
!=
null
)
{
if
(
array_key_exists
(
'connection'
,
$response
)
&&
$response
[
'connection'
]
==
'error'
)
{
...
...
src/opnsense/scripts/
pkg_update
check.sh
→
src/opnsense/scripts/
firmware/
check.sh
View file @
6c9838a5
#!/bin/sh
# Copyright (C) 2015 Franco Fichtner <franco@opnsense.org>
# Copyright (C) 2014 Deciso B.V.
# All rights reserved.
#
...
...
@@ -24,10 +25,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# USAGE:
# Add this file to a CRON job to check for package updates regularly
#
# This script generates a json structured file with the following content:
# connection: error|ok
# repository: error|ok
...
...
@@ -39,7 +36,7 @@
# reinstall_packages: array with { name: <package_name>, version: <package_version> }
# upgrade_packages: array with { name: <package_name>, current_version: <current_version>, new_version: <new_version> }
# TODO: Add object with items that will be removed
or uninstalled
# TODO: Add object with items that will be removed
# Variables used
connection
=
"error"
...
...
src/opnsense/service/conf/actions.d/actions_firmware.conf
View file @
6c9838a5
[
pkgstatus
]
command
:/
usr
/
local
/
opnsense
/
scripts
/
pkg_update
check
.
sh
[
check
]
command
:/
usr
/
local
/
opnsense
/
scripts
/
firmware
/
check
.
sh
parameters
:
type
:
script_output
message
:
retrieve
package
status
...
...
src/www/widgets/widgets/system_information.widget.php
View file @
6c9838a5
...
...
@@ -35,7 +35,7 @@ require_once("system.inc");
require_once
(
"stats.inc"
);
if
(
isset
(
$_REQUEST
[
'getupdatestatus'
]))
{
$pkg_json
=
trim
(
configd_run
(
'firmware
pkgstatus
'
));
$pkg_json
=
trim
(
configd_run
(
'firmware
check
'
));
if
(
$pkg_json
!=
''
)
{
$pkg_status
=
json_decode
(
$pkg_json
,
true
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment