diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-07 23:09:38 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-07 23:09:38 +0000 |
commit | 9350a6429e6a1dc6d611e698d65695d1aa8b1f94 (patch) | |
tree | a5c36d065efcef31e4c0d338ab8a1e44b3d05d2d | |
parent | 7f37e7dcba05e289d584247c8c35c697587658f4 (diff) | |
download | pfsense-9350a6429e6a1dc6d611e698d65695d1aa8b1f94.zip pfsense-9350a6429e6a1dc6d611e698d65695d1aa8b1f94.tar.gz |
Remove any previous MD5 sums after upgrade.
-rw-r--r-- | etc/rc.initial_firmware_update | 5 | ||||
-rwxr-xr-x | tmp/post_upgrade_command | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/etc/rc.initial_firmware_update b/etc/rc.initial_firmware_update index 5b4bb5d..0412dfd 100644 --- a/etc/rc.initial_firmware_update +++ b/etc/rc.initial_firmware_update @@ -77,9 +77,11 @@ switch ($command) { if($source_md5 <> $file_md5) { echo "\n\nMD5 checksum does not match. Cancelling upgrade.\n\n"; fclose($fp); + exec("rm -f /root/*.md5"); die -1; } echo "\nMD5 checksum matches.\n"; + exec("rm -f /root/*.md5"); } if(file_exists("/root/firmware.tgz")) do_upgrade("/root/firmware.tgz"); @@ -141,6 +143,7 @@ function do_upgrade($path) { die; } +exec("rm -f /root/*.md5"); fclose($fp); -?>
\ No newline at end of file +?> diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command index 9563c65..417b223 100755 --- a/tmp/post_upgrade_command +++ b/tmp/post_upgrade_command @@ -3,7 +3,6 @@ touch /var/run/config.lock /etc/rc.conf_mount_rw - KERNELTYPE=`cat /boot/kernel/pfsense_kernel.txt` if [ $KERNELTYPE = "wrap" ]; then if [ -f /kernels/kernel_wrap.gz ]; then @@ -28,4 +27,6 @@ fi # Now turn on or off serial console as needed php -f /tmp/post_upgrade_command.php +# Remove any previous MD5 sum files +rm -f /root/*.md5 |