mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add pre_upgrade_command hook support
This commit is contained in:
parent
d184e09535
commit
39346bbfce
@ -161,6 +161,13 @@ pfSenseupgrade)
|
||||
backup_chflags
|
||||
remove_chflags
|
||||
|
||||
# Do we have a pre-upgrade hook in the update file?
|
||||
if [ `tar tvzf $IMG | grep /tmp/pre_upgrade_command | wc -l` -gt 0 ]; then
|
||||
tar xzvf $IMG -C / ./tmp/pre_upgrade_command
|
||||
chmod a+rx /tmp/pre_upgrade_command
|
||||
sh /tmp/pre_upgrade_command
|
||||
fi
|
||||
|
||||
#exec </dev/console >/dev/console 2>/dev/console
|
||||
|
||||
echo "Firmware upgrade in progress..." | logger -p daemon.info -i -t Upgrade
|
||||
|
||||
Loading…
Reference in New Issue
Block a user