Commit cc7aeef0 authored by Franco Fichtner's avatar Franco Fichtner

configd: create backend calls for firmware mirror/flavour

parent 74a24794
......@@ -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'])));
}
}
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment