summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-04-12 22:12:07 +0000
committerBill Marquette <billm@pfsense.org>2005-04-12 22:12:07 +0000
commitb8575f61ce5b6b3c2739ac5e5804bcee1bd0d45e (patch)
tree97d8824e8e11253ceac53fed4751fc366cee55b2 /etc/rc.firmware
parente607da616009546b5a5a55b5eb91ea4b328b3b4e (diff)
downloadpfsense-b8575f61ce5b6b3c2739ac5e5804bcee1bd0d45e.zip
pfsense-b8575f61ce5b6b3c2739ac5e5804bcee1bd0d45e.tar.gz
split out directories for sanities sake
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-xetc/rc.firmware16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index d35aaee..98d78bc 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -15,16 +15,16 @@ fi
binary_update() {
TGZ=$1
- mkdir /tmp/patched
- cd /tmp
+ mkdir /tmp/patched /tmp/patches
+ cd /tmp/patches
for i in `tar tzf $TGZ | egrep -v "(^\./\.*/$|^\./$|.md5)"`;
do (
echo "Working on ${i}";
- cd /tmp/patched && /usr/bin/tar xvzf ${TGZ} ${i} ${i}.old_file_md5 ${i}.new_patch_md5 ${i}.new_file_md5;
- /usr/local/bin/bspatch /${i} /tmp/patched/${i} /tmp/${i};
- OLD_FILE_MD5=`cat /tmp/patched/${i}.old_file_md5`;
- NEW_PATCH_MD5=`cat /tmp/patched/${i}.new_patch_md5`;
- NEW_FILE_MD5=`cat /tmp/patched/${i}.new_file_md5`;
+ /usr/bin/tar xvzf ${TGZ} ${i} ${i}.old_file_md5 ${i}.new_patch_md5 ${i}.new_file_md5;
+ /usr/local/bin/bspatch /${i} /tmp/patched/${i} /tmp/patches/${i};
+ OLD_FILE_MD5=`cat /tmp/patches/${i}.old_file_md5`;
+ NEW_PATCH_MD5=`cat /tmp/patches/${i}.new_patch_md5`;
+ NEW_FILE_MD5=`cat /tmp/patches/${i}.new_file_md5`;
PATCHED_MD5=`/sbin/md5 -q /tmp/patched/${i}`;
if [ "$PATCHED_MD5" = "$NEW_FILE_MD5" ]; then
/bin/mv /tmp/patched/${i} /${i};
@@ -32,8 +32,8 @@ binary_update() {
echo "${i} file does not match intended final md5.";
echo "${i} file does not match intended final md5." >> /tmp/errors;
fi
- /bin/rm /tmp/patched/${i}.*;
/bin/rm /tmp/patched/${i}
+ /bin/rm /tmp/patches/${i}.*;
);
done
}
OpenPOWER on IntegriCloud