summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-04-13 02:30:11 +0000
committerBill Marquette <billm@pfsense.org>2005-04-13 02:30:11 +0000
commit03485a223bab5274163bbb21d5729d2658a0ad72 (patch)
treefdb216c32a93bb20824717b75fc402b9c93d366e /etc/rc.firmware
parent3200f985e7f46e5d88c975ea98f104549b4f891f (diff)
downloadpfsense-03485a223bab5274163bbb21d5729d2658a0ad72.zip
pfsense-03485a223bab5274163bbb21d5729d2658a0ad72.tar.gz
no need to create full path to output file, just dump it in /tmp/patched
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-xetc/rc.firmware9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 93607d7..8ca903c 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -20,26 +20,27 @@ binary_update() {
cd /tmp/patches
for i in `tar tzf $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 xvzf ${TGZ} ${i} ${i}.old_file_md5 ${i}.new_patch_md5 ${i}.new_file_md5
# Apply patch - oldfile newfile patchfile
- /usr/local/bin/bspatch /${i} /tmp/patched/${i} /tmp/patches/${i}
+ /usr/local/bin/bspatch /${i} /tmp/patched/${FILE} /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}`
+ PATCHED_MD5=`/sbin/md5 -q /tmp/patched/${FILE}`
if [ "$PATCHED_MD5" = "$NEW_PATCH_MD5" ]; then
- /bin/mv /tmp/patched/${i} /${i}
+ /bin/cp /tmp/patched/${FILE} /${i}
else
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/${FILE}
/bin/rm /tmp/patches/${i}
/bin/rm /tmp/patches/${i}.*
done
OpenPOWER on IntegriCloud