diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-07-07 02:06:36 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-07-07 02:06:36 +0000 |
commit | 4a8e802d8497a4cb6847bb3ebeee78d527008722 (patch) | |
tree | ce91e2338b1f3450dbeff59f48936adad9ccd7f7 | |
parent | 75c7ac379c1f079b4d80664c49d0b741ae2e8c5c (diff) | |
download | pfsense-4a8e802d8497a4cb6847bb3ebeee78d527008722.zip pfsense-4a8e802d8497a4cb6847bb3ebeee78d527008722.tar.gz |
Add pre_upgrade_command hook support
-rwxr-xr-x | etc/rc.firmware | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware index a6e0082..8c4eab5 100755 --- a/etc/rc.firmware +++ b/etc/rc.firmware @@ -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 |