summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-10-20 10:41:02 -0500
committerRenato Botelho <garga@FreeBSD.org>2014-10-20 10:41:12 -0500
commit6d9514581abc09a05f6d86633bbd0bb08aab2cf5 (patch)
tree3d1ea5929df49ba5df12a057e85bab6459975441
parent13ec619c9c46b83bd9d10641a09e6495f30807df (diff)
downloadpfsense-6d9514581abc09a05f6d86633bbd0bb08aab2cf5.zip
pfsense-6d9514581abc09a05f6d86633bbd0bb08aab2cf5.tar.gz
Let user decide if he wants to proceed to the upgrade when sha256 fails to download. Fixes #3576
-rwxr-xr-xetc/rc.initial.firmware_update9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index 1deff88..4ae9adb 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -87,7 +87,14 @@ switch ($command) {
} else {
echo "\n\nWARNING.\n";
echo "\nCould not locate a sha256 file. We cannot verify the download once completed.\n\n";
- sleep(15);
+ echo "Do you still want to proceed with the upgrade [n]? ";
+ $answer = strtoupper(chop(fgets($fp)));
+ if ($answer == "Y" or $answer == "YES") {
+ echo "\nContinuing upgrade...";
+ } else {
+ echo "\nUpgrade cancelled.\n\n";
+ die;
+ }
}
if(file_exists("/root/firmware.tgz.sha256")) {
$source_sha256 = trim(`cat /root/firmware.tgz.sha256 | awk '{ print \$4 }'`,"\r");
OpenPOWER on IntegriCloud