# 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.">> /conf/upgrade_log.txt 2>&1
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
...
...
@@ -147,7 +147,7 @@ pfSenseNanoBSDupgrade)
echo"You cannot use a full file for upgrade. Please use a file labeled nanobsd upgrade."
file_notice "NanoBSDUpgradeFailure""You have attemped to use a full NanoBSD installation file as an upgrade. Please use a NanoBSD file labeled 'upgrade' instead."
rm-f$IMG
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
...
...
@@ -217,7 +217,7 @@ pfSenseNanoBSDupgrade)
rm-f /var/run/firmwarelock.dirty
rm-f /var/run/firmware.lock
rm-f${IMG}
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
...
...
@@ -268,7 +268,7 @@ pfSenseNanoBSDupgrade)
rm-f$IMG
rm-f /var/run/firmwarelock.dirty
rm-f /var/run/firmware.lock
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
...
...
@@ -314,7 +314,7 @@ pfSenseNanoBSDupgrade)
rm-f /var/run/firmwarelock.dirty
rm-f /var/run/firmware.lock
umount /tmp/$GLABEL_SLICE
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
echo"">> /conf/upgrade_log.txt
...
...
@@ -362,7 +362,7 @@ pfSenseNanoBSDupgrade)
touch /conf/needs_package_sync
# remount /cf ro
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
/bin/sync
echo"NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds.">> /conf/upgrade_log.txt 2>&1
...
...
@@ -381,7 +381,7 @@ pfSenseupgrade)
# 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.">> /conf/upgrade_log.txt 2>&1