diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-10 04:24:42 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-10 04:24:42 +0000 |
commit | 48e46233b7fdb4dacfe648efa087994de79dc46d (patch) | |
tree | 4f228a94120992761ec49cd1b5d90832657b07e4 /usr/local/sbin | |
parent | 977b24b38e6a77d921d59c6da6f45744ef178e35 (diff) | |
download | pfsense-48e46233b7fdb4dacfe648efa087994de79dc46d.zip pfsense-48e46233b7fdb4dacfe648efa087994de79dc46d.tar.gz |
* Change timeout to 60 seconds
* Check $? after fetch
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/update_file.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/local/sbin/update_file.sh b/usr/local/sbin/update_file.sh index 2bcde02..f766ff4 100755 --- a/usr/local/sbin/update_file.sh +++ b/usr/local/sbin/update_file.sh @@ -30,20 +30,23 @@ fi /etc/rc.conf_mount_rw for file in $FMATCHES ;do + if [ ! -z $2 ];then rev=$2 echo "trying to fetch $rev $file" else echo "trying to fetch latest $file" fi - #echo fetch -o "$file" "$baseurl$file$urlrev$rev$urlcon" - `which fetch` -q -o "$file" "$baseurl$file$urlrev$rev$urlcon" + + /usr/bin/fetch -T 60 -q -o "$file" "$baseurl$file$urlrev$rev$urlcon" + + if [ $? -eq 0 ]; then + echo "File updated." + else + echo "An error occured during update." + fi + done /etc/rc.conf_mount_ro -if [ $? -eq 0 ]; then - echo "File updated." - else - echo "An error occured during update." -fi
\ No newline at end of file |