summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware_auto
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-04-30 22:05:24 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-04-30 22:05:24 +0000
commit7105aae8cce9b5c5eda8c89c274fdf896d4ef09e (patch)
tree37e0ea602bdc4701b3316fe48485623b602026f4 /etc/rc.firmware_auto
parent158dd870a3dcd9eaa35b92075fec3b3c6509996d (diff)
downloadpfsense-7105aae8cce9b5c5eda8c89c274fdf896d4ef09e.zip
pfsense-7105aae8cce9b5c5eda8c89c274fdf896d4ef09e.tar.gz
* Cleanup firmware upgrade
* Only attempt mount of wrap or soekris platofmrs
Diffstat (limited to 'etc/rc.firmware_auto')
-rwxr-xr-xetc/rc.firmware_auto24
1 files changed, 18 insertions, 6 deletions
diff --git a/etc/rc.firmware_auto b/etc/rc.firmware_auto
index 6ead7de..ad04ce5 100755
--- a/etc/rc.firmware_auto
+++ b/etc/rc.firmware_auto
@@ -23,8 +23,10 @@ fi
#echo "Downloading $FMFILENAME.md5 from $FMBASEURL ..." | logger -p daemon.info -i -t AutoUpgrade
#/usr/bin/fetch -o /tmp/latest.tgz.md5 $FETCHFILENAME.md5 | logger -p daemon.info -i -t AutoUpgrade
-PMD=`/bin/cat /tmp/latest.tgz.md5 | cut -d" " -f4 `;
-MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`;
+PMD=`/bin/cat /tmp/latest.tgz.md5 | cut -d" " -f4 `
+MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`
+
+PLATFORM=`cat /etc/version`
echo " Package MD5: ${PMD}" | logger -p daemon.info -i -t AutoUpgrade
echo "Downloaded MD5: ${MD}" | logger -p daemon.info -i -t AutoUpgrade
@@ -41,13 +43,23 @@ fi
if [ "$PMD" = "$MD" ]; then
echo "MD5's match." | logger -p daemon.info -i -t AutoUpgrade
- /etc/rc.conf_mount_rw
+ if [ "$PLATFORM" = "net45xx" ]; then
+ /usr/local/bin/php /etc/rc.conf_mount_rw
+ fi
+ if [ "$PLATFORM" = "wrap" ]; then
+ /usr/local/bin/php /etc/rc.conf_mount_rw
+ fi
if [ -r "/tmp/custom.tgz" ]; then
- /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
+ sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
else
- /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz
+ sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz
+ fi
+ if [ "$PLATFORM" = "wrap" ]; then
+ /usr/local/bin/php /etc/rc.conf_mount_ro
fi
- /etc/rc.conf_mount_ro
+ if [ "$PLATFORM" = "net45xx" ]; then
+ /usr/local/bin/php /etc/rc.conf_mount_ro
+ fi
exit 0
fi
OpenPOWER on IntegriCloud