summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.firmware_update
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-01 22:26:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-01 22:26:14 +0000
commit9b5d2d24a3b27c0c543aea1b41400afd3a7d874d (patch)
treed849f3a398e6b84da127d90d914d48fd494693a5 /etc/rc.initial.firmware_update
parent47944c7c2d90e46157bab0308f10c5d4d7349aab (diff)
downloadpfsense-9b5d2d24a3b27c0c543aea1b41400afd3a7d874d.zip
pfsense-9b5d2d24a3b27c0c543aea1b41400afd3a7d874d.tar.gz
Exit if URL or PATH is blank.
Diffstat (limited to 'etc/rc.initial.firmware_update')
-rwxr-xr-xetc/rc.initial.firmware_update4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index 749207e..8bb6a7b 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -36,6 +36,8 @@ switch ($command) {
case "1":
echo "\nEnter the URL to the .tgz update file:\n> ";
$url = chop(fgets($fp));
+ if(!$url)
+ die;
$status = does_url_exist($url);
if($status) {
echo "\nFetching file...\n";
@@ -65,6 +67,8 @@ switch ($command) {
case "2":
echo "\nEnter the complete path to the .tgz update file: ";
$path = chop(fgets($fp));
+ if(!$path)
+ die;
if(file_exists($path)) {
do_upgrade($path);
} else {
OpenPOWER on IntegriCloud