diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-29 16:47:02 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-29 16:47:02 -0400 |
commit | 50ba07eaf11b46d50022ee924356dc94cbcd81f0 (patch) | |
tree | 224213788fead9c8283d08cea1934504b67f4ac5 /etc/rc.firmware | |
parent | bc43f0eead2220fe04f6891795d7fb481f3331be (diff) | |
download | pfsense-50ba07eaf11b46d50022ee924356dc94cbcd81f0.zip pfsense-50ba07eaf11b46d50022ee924356dc94cbcd81f0.tar.gz |
Mount RW so we can write to logs. Duh. Mount RO if we exit out of an upgrade.
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-x | etc/rc.firmware | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware index 98c4573..4b333fe 100755 --- a/etc/rc.firmware +++ b/etc/rc.firmware @@ -295,16 +295,25 @@ pfSenseNanoBSDupgrade) ;; pfSenseupgrade) - + + # mount /cf + /etc/rc.conf_mount_rw + # Sanity check - bail early if there's no firmware file! if [ ! -r $IMG ]; then echo "2nd parameter has not been passed or file does not exist. Exiting." >> /cf/upgrade_log.txt 2>&1 + /etc/rc.conf_mount_ro exit fi # wait 1 seconds before beginning sleep 1 + # Log that we are really doing a NanoBSD upgrade + echo "" >> /cf/upgrade_log.txt + echo "NanoBSD upgrade starting" >> /cf/upgrade_log.txt + echo "" >> /cf/upgrade_log.txt + touch /var/run/firmware.lock touch /cf/upgrade_log.txt @@ -325,9 +334,7 @@ pfSenseupgrade) echo "Firmware upgrade in progress..." >> /cf/upgrade_log.txt 2>&1 echo "Firmware upgrade in progress..." | wall - - # mount /cf - /etc/rc.conf_mount_rw + # backup config /bin/mkdir -p /tmp/configbak cp -p /conf/* /tmp/configbak 2>/dev/null |