summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-05-19 17:53:39 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-05-19 17:53:39 +0000
commit8a1691dd3ffb54748385e6a9dc22b8bcc5f79e72 (patch)
tree911e3235414fb9fc9d09aef96258bdb08f6b7821 /etc/rc.firmware
parent5cabfeb322be8e51229273fcb424ee87db1723f8 (diff)
downloadpfsense-8a1691dd3ffb54748385e6a9dc22b8bcc5f79e72.zip
pfsense-8a1691dd3ffb54748385e6a9dc22b8bcc5f79e72.tar.gz
* Complete path to common binaries
* Find CVS directory and zap after upgrades
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-xetc/rc.firmware13
1 files changed, 7 insertions, 6 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index a83bd8e..8b21977 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -18,19 +18,19 @@ backup_chflags() {
}
restore_chflags() {
- cd / && bzcat /tmp/chflags.dist.bz2 | /usr/sbin/mtree -PU -p /
+ cd / && /usr/bin/bzcat /tmp/chflags.dist.bz2 | /usr/sbin/mtree -PU -p /
}
remove_chflags() {
- chflags -R noschg /
- chmod -R u+rw /
+ /usr/bin/chflags -R noschg /
+ /bin/chmod -R u+rw /
}
binary_update() {
TGZ=$1
ERR_F="/tmp/bdiff.log"
rm ${ERR_F} 2>/dev/null
- mkdir /tmp/patched /tmp/patches 2>>${ERR_F}
+ /bin/mkdir /tmp/patched /tmp/patches 2>>${ERR_F}
backup_chflags
remove_chflags
cd /tmp/patches
@@ -60,7 +60,7 @@ binary_update() {
/bin/rm /tmp/patches/${i} >> ${ERR_F}
/bin/rm /tmp/patches/${i}.* >> ${ERR_F}
done
- rm -rf /tmp/patched /tmp/patches >> ${ERR_F}
+ /bin/rm -rf /tmp/patched /tmp/patches >> ${ERR_F}
restore_chflags
}
@@ -124,7 +124,7 @@ pfSenseupgrade)
echo "Firmware upgrade in progress..." | logger -p daemon.info -i -t Upgrade
# backup config
- mkdir /tmp/configbak
+ /bin/mkdir /tmp/configbak
cp -p /conf/* /tmp/configbak
# mount /cf
/sbin/mount -w -o noatime /cf
@@ -133,6 +133,7 @@ pfSenseupgrade)
if [ -r $2 ]; then
echo "Installing $2." | logger -p daemon.info -i -t Upgrade
/usr/bin/tar xzPf $2 -U -C / | logger -p daemon.info -i -t Upgrade
+ /usr/bin/find / -name CVS -exec rm {} \;
echo "Image installed $2." | logger -p daemon.info -i -t Upgrade
else
echo "2nd paramater has not been passed; skipping." | logger -p daemon.info -i -t Upgrade
OpenPOWER on IntegriCloud