diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-31 23:28:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-31 23:28:19 +0000 |
commit | 18ff56f25607c33a02598500585e7b502755029b (patch) | |
tree | bf61990ad0a1b8992926fe7675487a0345149e9f /etc/rc.firmware_auto | |
parent | 6305e67c459b8c685ad2e483c6d607404c74e2e5 (diff) | |
download | pfsense-18ff56f25607c33a02598500585e7b502755029b.zip pfsense-18ff56f25607c33a02598500585e7b502755029b.tar.gz |
Add auto upgrade option to pfSense
Diffstat (limited to 'etc/rc.firmware_auto')
-rwxr-xr-x | etc/rc.firmware_auto | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/etc/rc.firmware_auto b/etc/rc.firmware_auto new file mode 100755 index 0000000..ac1ac95 --- /dev/null +++ b/etc/rc.firmware_auto @@ -0,0 +1,22 @@ +#!/bin/sh + +echo "Downloading latest.tgz ..." +cd /tmp && fetch http://www.pfSense.com/latest.tgz +echo "Downloading latest.tgz.md5 ..." +cd /tmp && fetch http://www.pfSense.com/latest.tgz.md5 + +PMD=`cat /tmp/latest.tgz.md5 | cut -d" " -f4 `; +MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`; + +echo " Package MD5: ${PMD}" +echo "Downloaded MD5: ${MD}" + +if test "$PMD" = "$MD" + echo "MD5's match." + /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz +then + echo "MD5's do not match." + exit 0 +fi + + |