diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-12 17:52:29 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-12 17:52:29 +0000 |
commit | f1b025971b4e7749c9a9b7c75b21daa63e80c013 (patch) | |
tree | 0160c42934611576b3b35ed38121eb5b81aaa5ca /etc/rc.firmware_auto | |
parent | dc1c55041b99f66efec8a29e07b5104d9ec3a042 (diff) | |
download | pfsense-f1b025971b4e7749c9a9b7c75b21daa63e80c013.zip pfsense-f1b025971b4e7749c9a9b7c75b21daa63e80c013.tar.gz |
Stub in changes that will allow for custom firmware URLs
Diffstat (limited to 'etc/rc.firmware_auto')
-rwxr-xr-x | etc/rc.firmware_auto | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/etc/rc.firmware_auto b/etc/rc.firmware_auto index 113fe8e..2bc347c 100755 --- a/etc/rc.firmware_auto +++ b/etc/rc.firmware_auto @@ -1,5 +1,8 @@ #!/bin/sh +FMBASEURL=$1 +FMFILENAME=$2 + # wait 5 seconds before beginning sleep 5 @@ -8,16 +11,16 @@ logger -p daemon.info -i -t AutoUpgrade "Auto Upgrade started" HTTP_AUTH="" # if username and password is passed, let fetch utilize. -if [ $# -gt 1 ]; then -HTTP_AUTH="basic:*:$1:$2" +if [ $# -gt 3 ]; then +HTTP_AUTH="basic:*:$3:$4" fi -echo "Downloading latest.tgz ..." | logger -p daemon.info -i -t AutoUpgrade -cd /tmp && fetch http://www.pfSense.com/latest.tgz | logger -p daemon.info -i -t AutoUpgrade -echo "Downloading latest.tgz.md5 ..." | logger -p daemon.info -i -t AutoUpgrade -cd /tmp && fetch http://www.pfSense.com/latest.tgz.md5 | logger -p daemon.info -i -t AutoUpgrade +echo "Downloading ${FMFILENAME} from ${FMBASEURL} ..." | logger -p daemon.info -i -t AutoUpgrade +/usr/bin/fetch ${FMBASEURL}/${FMFILENAME} -o /tmp/latest.tgz | logger -p daemon.info -i -t AutoUpgrade +echo "Downloading ${FMFILENAME}.md5 from ${FMBASEURL} ..." | logger -p daemon.info -i -t AutoUpgrade +/usr/bin/fetch ${FMBASEURL}/${FMFILENAME}.md5 -o /tmp/latest.tgz.md5 | logger -p daemon.info -i -t AutoUpgrade -PMD=`cat /tmp/latest.tgz.md5 | cut -d" " -f4 `; +PMD=`/bin/cat /tmp/latest.tgz.md5 | cut -d" " -f4 `; MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`; echo " Package MD5: ${PMD}" | logger -p daemon.info -i -t AutoUpgrade |