summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-07-30 10:52:31 -0300
committerRenato Botelho <renato@netgate.com>2015-07-30 12:21:18 -0300
commit687631c68391223ea98c21f1e5ff46c297310236 (patch)
treef29ac6d87e9919c607f23ce151f7b6a89c036f03
parent488b975c8b4ff0d33eb2dc8668983ca4c888b334 (diff)
downloadpfsense-687631c68391223ea98c21f1e5ff46c297310236.zip
pfsense-687631c68391223ea98c21f1e5ff46c297310236.tar.gz
Remove bdiff support
-rwxr-xr-xetc/rc.firmware59
-rwxr-xr-xetc/rc.initial.firmware_update12
-rw-r--r--usr/local/www/system_firmware.php2
3 files changed, 2 insertions, 71 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 972ba77..2afb051 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -78,46 +78,6 @@ remove_chflags() {
done
}
-binary_update() {
- TGZ=$1
- ERR_F="/tmp/bdiff.log"
- rm ${ERR_F} 2>/dev/null
- /bin/mkdir /tmp/patched /tmp/patches 2>>${ERR_F}
- # Save the old shutdown binary. If we switch from i386 to amd64 (or back) the reboot binary won't run at the end since it doesn't match up.
- /bin/cp -p /sbin/shutdown /sbin/shutdown.old
- backup_chflags
- remove_chflags
- cd /tmp/patches
- for i in `/usr/bin/tar tvzf $TGZ | egrep -v "(^d|_md5)" | nawk '{print $9;}'`;
- do
- FILE=`basename ${i}`
- echo "Working on ${i}"
- # Untar patch file and md5 files
- /usr/bin/tar xzf ${TGZ} ${i} ${i}.old_file_md5 ${i}.new_patch_md5 ${i}.new_file_md5 2>>${ERR_F}
-
- # Apply patch - oldfile newfile patchfile
- /usr/local/bin/bspatch /${i} /tmp/patched/${FILE} /tmp/patches/${i} 2>>${ERR_F}
-
- OLD_FILE_MD5=`cat /tmp/patches/${i}.old_file_md5 2>/dev/null`
- NEW_PATCH_MD5=`cat /tmp/patches/${i}.new_patch_md5 2>/dev/null`
- NEW_FILE_MD5=`cat /tmp/patches/${i}.new_file_md5 2>/dev/null`
- PATCHED_MD5=`/sbin/md5 -q /tmp/patched/${FILE} 2>/dev/null`
-
- if [ "$PATCHED_MD5" = "$NEW_PATCH_MD5" ]; then
- /usr/bin/install -S /tmp/patched/${FILE} /${i}
- else
- #echo "${i} file does not match intended final md5."
- echo "${i} file does not match intended final md5." >> ${ERR_F}
- fi
-
- /bin/rm /tmp/patched/${FILE} >> ${ERR_F}
- /bin/rm /tmp/patches/${i} >> ${ERR_F}
- /bin/rm /tmp/patches/${i}.* >> ${ERR_F}
- done
- /bin/rm -rf /tmp/patched /tmp/patches >> ${ERR_F}
- restore_chflags
-}
-
case $ACTION in
enable)
touch /conf/upgrade_log.txt
@@ -516,24 +476,5 @@ pfSenseupgrade)
fi
;;
-delta_update)
- touch /var/run/firmwarelock.dirty
- backup_chflags
- remove_chflags
- binary_update $IMG
- restore_chflags
- rm -rf /etc/rc.conf
- find / -name CVS -type d -exec rm {} \;
- rm -rf /usr/savecore/*
- /etc/rc.conf_mount_ro
- /sbin/umount -f /cf 2>/dev/null
- /sbin/mount -r /cf 2>/dev/null
- /sbin/umount -f / 2>/dev/null
- /sbin/mount -r / 2>/dev/null
- if [ -e /etc/init_bootloader.sh ]; then
- sh /etc/init_bootloader.sh
- fi
-
- ;;
esac
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index bd1d16f..5e17924 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -109,10 +109,7 @@ switch ($command) {
echo "\nsha256 checksum matches.\n";
unlink_if_exists("/root/firmware.tgz.sha256");
}
- if (strstr($url, "bdiff")) {
- echo "Binary DIFF upgrade file detected...\n";
- $type = "bdiff";
- } elseif (strstr($url, "nanobsd")) {
+ if (strstr($url, "nanobsd")) {
echo "NanoBSD upgrade file detected...\n";
$type = "nanobsd";
} else {
@@ -129,9 +126,6 @@ switch ($command) {
fclose($fp);
die;
}
- if (stristr($path, "bdiff")) {
- $type = "bdiff";
- }
if (stristr($path, "nanobsd")) {
$type = "nanobsd";
}
@@ -175,9 +169,7 @@ function do_upgrade($path, $type) {
}
mark_subsystem_dirty('firmwarelock');
echo "\nOne moment please...\nInvoking firmware upgrade...";
- if ($type == "bdiff") {
- mwexec_bg("/etc/rc.firmware delta_update $path");
- } elseif ($type == "nanobsd") {
+ if ($type == "nanobsd") {
mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade $path");
} else {
mwexec_bg("/etc/rc.firmware pfSenseupgrade $path");
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index cb3dd90..d6d48ee 100644
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -188,8 +188,6 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
$savemsg = gettext("The firmware is now being updated. The firewall will reboot automatically.");
if (stristr($_FILES['ulfile']['name'], "nanobsd") or $_POST['isnano'] == "yes") {
mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz");
- } else if (stristr($_FILES['ulfile']['name'], "bdiff")) {
- mwexec_bg("/etc/rc.firmware delta_update {$g['upload_path']}/firmware.tgz");
} else {
if ($g['platform'] == "nanobsd") {
$whichone = "pfSenseNanoBSDupgrade";
OpenPOWER on IntegriCloud