mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
firmware: good-will nit-picking and some more work to do
This commit is contained in:
parent
49afa0595e
commit
15fbeec367
1
plist
1
plist
@ -606,6 +606,7 @@
|
||||
/usr/local/opnsense/scripts/firmware/running.sh
|
||||
/usr/local/opnsense/scripts/firmware/security.sh
|
||||
/usr/local/opnsense/scripts/firmware/sets.sh
|
||||
/usr/local/opnsense/scripts/firmware/sync.sh
|
||||
/usr/local/opnsense/scripts/firmware/type.sh
|
||||
/usr/local/opnsense/scripts/firmware/unlock.sh
|
||||
/usr/local/opnsense/scripts/firmware/upgrade.sh
|
||||
|
||||
@ -548,7 +548,7 @@ class FirmwareController extends ApiControllerBase
|
||||
$response = array();
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$response['status'] = strtolower(trim($backend->configdRun('firmware confplugins')));
|
||||
$response['status'] = strtolower(trim($backend->configdRun('firmware sync')));
|
||||
} else {
|
||||
$response['status'] = 'failure';
|
||||
}
|
||||
|
||||
@ -35,10 +35,10 @@ lock
|
||||
reinstall
|
||||
remove
|
||||
security
|
||||
sync
|
||||
type
|
||||
unlock
|
||||
upgrade
|
||||
confplugins
|
||||
"
|
||||
|
||||
SELECTED=${1}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2020 Deciso B.V.
|
||||
# Copyright (C) 2015-2017 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (C) 2015-2020 Franco Fichtner <franco@opnsense.org>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -26,12 +26,16 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PKG_PROGRESS_FILE=/tmp/pkg_upgrade.progress
|
||||
PACKAGES=`/usr/local/sbin/pluginctl -g system.firmware.plugins | /usr/bin/sed 's/,/ /g'`
|
||||
# XXX the issue here is we do get all plugins, but some are already installed
|
||||
PACKAGES=$(/usr/local/sbin/pluginctl -g system.firmware.plugins | /usr/bin/sed 's/,/ /g')
|
||||
|
||||
# Truncate upgrade progress file
|
||||
: > ${PKG_PROGRESS_FILE}
|
||||
|
||||
echo "***GOT REQUEST TO INSTALL: $PACKAGES***" >> ${PKG_PROGRESS_FILE}
|
||||
pkg install -y $PACKAGES >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
echo "***GOT REQUEST TO SYNC: ${PACKAGES}***" >> ${PKG_PROGRESS_FILE}
|
||||
for PACKAGE in ${PACKAGES}; do
|
||||
# XXX check which we really need to sync :)
|
||||
pkg install -y ${PACKAGE} >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
done
|
||||
pkg autoremove -y >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
echo '***DONE***' >> ${PKG_PROGRESS_FILE}
|
||||
@ -107,8 +107,8 @@ parameters:%s
|
||||
type:script_output
|
||||
message:Tested for presence of plugin %s
|
||||
|
||||
[confplugins]
|
||||
command: /usr/sbin/daemon -f /usr/local/opnsense/scripts/firmware/launcher.sh confplugins
|
||||
[sync]
|
||||
command: /usr/sbin/daemon -f /usr/local/opnsense/scripts/firmware/launcher.sh sync
|
||||
parameters:
|
||||
type:script
|
||||
message: install missing configured plugins
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user