summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-10 04:24:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-10 04:24:42 +0000
commit48e46233b7fdb4dacfe648efa087994de79dc46d (patch)
tree4f228a94120992761ec49cd1b5d90832657b07e4 /usr/local/sbin
parent977b24b38e6a77d921d59c6da6f45744ef178e35 (diff)
downloadpfsense-48e46233b7fdb4dacfe648efa087994de79dc46d.zip
pfsense-48e46233b7fdb4dacfe648efa087994de79dc46d.tar.gz
* Change timeout to 60 seconds
* Check $? after fetch
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/update_file.sh17
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
OpenPOWER on IntegriCloud