summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-10 18:34:10 -0400
committerScott Ullrich <sullrich@su.local>2009-09-10 18:34:10 -0400
commitae342f4779c0c7d1223da7416c9d2861b435f963 (patch)
treee2dca704364c99ee5bda2988eaf8cfea595742f9
parent595459a3fcb5d3230864463f4be9039601099b89 (diff)
downloadpfsense-ae342f4779c0c7d1223da7416c9d2861b435f963.zip
pfsense-ae342f4779c0c7d1223da7416c9d2861b435f963.tar.gz
Remove /var/run/firmware.lock as well
-rwxr-xr-xetc/rc.firmware13
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 92b7f6d..5790620 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -199,8 +199,9 @@ pfSenseNanoBSDupgrade)
SIZE=`/sbin/fdisk ${COMPLETE_PATH} | /usr/bin/grep Meg | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"(" -f2`
if [ "$SIZE" -lt "$NEW_IMG_SIZE" ]; then
file_notice "UpgradeFailure" "Upgrade failed due to the upgrade image being larger than the partition that is configured on disk. Halting. Size on disk: $SIZE < Size of new image: $NEW_IMG_SIZE"
- rm /var/run/firmwarelock.dirty
- /etc/rc.conf_mount_ro
+ rm -f /var/run/firmwarelock.dirty
+ rm -f /var/run/firmware.lock
+ /etc/rc.conf_mount_ro
exit 1
fi
@@ -258,7 +259,8 @@ pfSenseNanoBSDupgrade)
/sbin/fsck_ufs -y /dev/$COMPLETE_PATH >> /conf/upgrade_log.txt 2>&1
if [ $? != 0 ]; then
file_notice "UpgradeFailure" "{\$g['product_name']} upgrade has failed. Your system has been left in a usable state."
- rm /var/run/firmwarelock.dirty
+ rm -f /var/run/firmwarelock.dirty
+ rm -f /var/run/firmware.lock
/etc/rc.conf_mount_ro
exit 1
fi
@@ -293,7 +295,8 @@ pfSenseNanoBSDupgrade)
if [ $? != 0 ]; then
echo "Something went wrong when trying to update the fstab entry. Aborting upgrade."
file_notice "UpgradeFailure" "Something went wrong when trying to update the fstab entry. Aborting upgrade."
- rm /var/run/firmwarelock.dirty
+ rm -f /var/run/firmwarelock.dirty
+ rm -f /var/run/firmware.lock
umount /tmp/$GLABEL_SLICE
/etc/rc.conf_mount_ro
exit 1
@@ -359,6 +362,7 @@ pfSenseNanoBSDupgrade)
sleep 10
rm -f /var/run/firmwarelock.dirty
+ rm -f /var/run/firmware.lock
sh /etc/rc.reboot
;;
@@ -457,6 +461,7 @@ pfSenseupgrade)
# release the firmware lock
rm -f /var/run/firmwarelock.dirty
+ rm -f /var/run/firmware.lock
/bin/sync
# Sleep and allow disks to catch up
OpenPOWER on IntegriCloud