summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.firmware_update
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-17 00:03:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-17 00:03:27 +0000
commite1aea2cda04d9c99759946c845a5cdf1100bbaa0 (patch)
tree8129a33d7a14029dc168e41041df077796af7841 /etc/rc.initial.firmware_update
parentca7a3a5c75a388b75c046b16032fc44f0873a207 (diff)
downloadpfsense-e1aea2cda04d9c99759946c845a5cdf1100bbaa0.zip
pfsense-e1aea2cda04d9c99759946c845a5cdf1100bbaa0.tar.gz
When bdiff is detected in the filename, invoke the binary update
routines.
Diffstat (limited to 'etc/rc.initial.firmware_update')
-rwxr-xr-xetc/rc.initial.firmware_update15
1 files changed, 11 insertions, 4 deletions
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index 3ece180..5acfe40 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -88,8 +88,10 @@ switch ($command) {
echo "\nMD5 checksum matches.\n";
exec("rm -f /root/*.md5");
}
+ if(stristr($url,"bdiff"))
+ $type = "bdiff";
if(file_exists("/root/firmware.tgz"))
- do_upgrade("/root/firmware.tgz");
+ do_upgrade("/root/firmware.tgz", $type);
} else {
echo "\nCould not download update.\n\n";
fclose($fp);
@@ -102,9 +104,11 @@ switch ($command) {
fclose($fp);
die;
}
+ if(stristr($fp,"bdiff"))
+ $type = "bdiff";
if(file_exists($path)) {
touch($d_fwupenabled_path);
- do_upgrade($path);
+ do_upgrade($path, $type);
} else {
echo "\nCould not find file.\n\n";
fclose($fp);
@@ -148,11 +152,14 @@ function check_for_kernel_file() {
}
}
-function do_upgrade($path) {
+function do_upgrade($path, $type) {
global $fp;
check_for_kernel_file();
echo "\nOne moment please... Invoking firmware upgrade...\n";
- exec("/etc/rc.firmware pfSenseupgrade $path");
+ if($type == "bdiff")
+ exec("/etc/rc.firmware delta_update $path");
+ else
+ exec("/etc/rc.firmware pfSenseupgrade $path");
unlink_if_exists($path);
die;
}
OpenPOWER on IntegriCloud