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
cc7aeef0
Commit
cc7aeef0
authored
Oct 11, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configd: create backend calls for firmware mirror/flavour
parent
74a24794
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
system.inc
src/etc/inc/system.inc
+2
-10
actions_firmware.conf
src/opnsense/service/conf/actions.d/actions_firmware.conf
+12
-0
No files found.
src/etc/inc/system.inc
View file @
cc7aeef0
...
...
@@ -1378,19 +1378,11 @@ function system_firmware_configure()
copy
(
"${origin_conf}.sample"
,
$origin_conf
);
if
(
isset
(
$config
[
'system'
][
'firmware'
][
'mirror'
]))
{
/* XXX create a proper backend call */
mwexecf
(
'/usr/local/sbin/opnsense-update -sm %s'
,
str_replace
(
'/'
,
'\/'
,
$config
[
'system'
][
'firmware'
][
'mirror'
])
);
configd_run
(
'firmware mirror '
.
escapeshellarg
(
str_replace
(
'/'
,
'\/'
,
$config
[
'system'
][
'firmware'
][
'mirror'
])));
}
if
(
isset
(
$config
[
'system'
][
'firmware'
][
'flavour'
]))
{
/* XXX create a proper backend call */
mwexecf
(
'/usr/local/sbin/opnsense-update -sn %s'
,
str_replace
(
'/'
,
'\/'
,
$config
[
'system'
][
'firmware'
][
'flavour'
])
);
configd_run
(
'firmware flavour '
.
escapeshellarg
(
str_replace
(
'/'
,
'\/'
,
$config
[
'system'
][
'firmware'
][
'flavour'
])));
}
}
...
...
src/opnsense/service/conf/actions.d/actions_firmware.conf
View file @
cc7aeef0
...
...
@@ -27,3 +27,15 @@ command: pkg rquery "%n|||%v|||%c|||%sh"
parameters
:
type
:
script_output
message
:
view
remote
packages
[
mirror
]
command
:/
usr
/
local
/
sbin
/
opnsense
-
update
-
sm
parameters
:%
s
type
:
script
message
:
switching
firmware
mirror
to
%
s
[
flavour
]
command
:/
usr
/
local
/
sbin
/
opnsense
-
update
-
sn
parameters
:%
s
type
:
script
message
:
switching
firmware
flavour
to
%
s
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