From 62142858f363426382706285d5c4a5a854570ba7 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Fri, 23 Apr 2010 05:37:55 +0000 Subject: [PATCH] update the wget code to download function, git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5861 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcatdsklspost | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 1eae13ba6..d8e1623b7 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -25,7 +25,7 @@ download_postscripts() retry=0 rc=1 while [ 0 -eq 0 ]; do - wget -l inf -N -r --waitretry=10 --random-wait -T 60 ftp://$server/postscripts 2> /tmp/wget.log + wget -l inf -nH -N -r --waitretry=10 --random-wait -T 60 ftp://$server/postscripts -P /xcatpost --cut-dirs=1 2> /tmp/wget.log rc=$? if [ $rc -eq 0 ]; then @@ -107,6 +107,12 @@ if [ "$MODE" == "4" ]; then # for statelite mode if [ -f /opt/xcat/xcatinfo ]; then SIP=`cut -d= -f2 /opt/xcat/xcatinfo`; + if [ -n "$SIP" ]; then + download_postscripts $SIP + if [ $? -eq 0 ]; then + downloaded=1 + fi + fi else echo "xCAT management server IP can't be determined.\nexiting..."; logger -t xCAT "xcatdsklspost:xCAT management server IP can't be determined.\nexiting..."; @@ -189,8 +195,6 @@ if grep 'rw /rw tmpfs ' /proc/mounts >& /dev/null; then ln -sf /etc/rc6.d/K10xcatmounts /etc/rc0.d/K10xcatmounts fi -rm -rf /xcatpost/*; -wget -l inf -nH -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$SIP/postscripts -P /xcatpost --cut-dirs=1 2> /tmp/wget.log chmod +x /xcatpost/*; cd /xcatpost;