Revision ae342f47
Added by Scott Ullrich almost 16 years ago
etc/rc.firmware | ||
---|---|---|
199 | 199 |
SIZE=`/sbin/fdisk ${COMPLETE_PATH} | /usr/bin/grep Meg | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"(" -f2` |
200 | 200 |
if [ "$SIZE" -lt "$NEW_IMG_SIZE" ]; then |
201 | 201 |
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" |
202 |
rm /var/run/firmwarelock.dirty |
|
203 |
/etc/rc.conf_mount_ro |
|
202 |
rm -f /var/run/firmwarelock.dirty |
|
203 |
rm -f /var/run/firmware.lock |
|
204 |
/etc/rc.conf_mount_ro |
|
204 | 205 |
exit 1 |
205 | 206 |
fi |
206 | 207 |
|
... | ... | |
258 | 259 |
/sbin/fsck_ufs -y /dev/$COMPLETE_PATH >> /conf/upgrade_log.txt 2>&1 |
259 | 260 |
if [ $? != 0 ]; then |
260 | 261 |
file_notice "UpgradeFailure" "{\$g['product_name']} upgrade has failed. Your system has been left in a usable state." |
261 |
rm /var/run/firmwarelock.dirty |
|
262 |
rm -f /var/run/firmwarelock.dirty |
|
263 |
rm -f /var/run/firmware.lock |
|
262 | 264 |
/etc/rc.conf_mount_ro |
263 | 265 |
exit 1 |
264 | 266 |
fi |
... | ... | |
293 | 295 |
if [ $? != 0 ]; then |
294 | 296 |
echo "Something went wrong when trying to update the fstab entry. Aborting upgrade." |
295 | 297 |
file_notice "UpgradeFailure" "Something went wrong when trying to update the fstab entry. Aborting upgrade." |
296 |
rm /var/run/firmwarelock.dirty |
|
298 |
rm -f /var/run/firmwarelock.dirty |
|
299 |
rm -f /var/run/firmware.lock |
|
297 | 300 |
umount /tmp/$GLABEL_SLICE |
298 | 301 |
/etc/rc.conf_mount_ro |
299 | 302 |
exit 1 |
... | ... | |
359 | 362 |
sleep 10 |
360 | 363 |
|
361 | 364 |
rm -f /var/run/firmwarelock.dirty |
365 |
rm -f /var/run/firmware.lock |
|
362 | 366 |
sh /etc/rc.reboot |
363 | 367 |
|
364 | 368 |
;; |
... | ... | |
457 | 461 |
|
458 | 462 |
# release the firmware lock |
459 | 463 |
rm -f /var/run/firmwarelock.dirty |
464 |
rm -f /var/run/firmware.lock |
|
460 | 465 |
/bin/sync |
461 | 466 |
|
462 | 467 |
# Sleep and allow disks to catch up |
Also available in: Unified diff
Remove /var/run/firmware.lock as well