diff options
-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 |