defect 3612: add one line to handle variable like in the runimage; And added the checking code logic to display error message if wget failed
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16593 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
6a72e5feb6
commit
685e039254
@ -82,8 +82,8 @@ dhclient -6 -pf /var/run/dhclient6.$bootnic.pid $bootnic -lf /var/lib/dhclient/d
|
||||
NICSTOBRINGUP=`ip link|grep mtu|grep -v LOOPBACK|grep -v $bootnic|grep -v usb|grep -v ,UP|awk -F: '{print $2}'`
|
||||
export NICSTOBRINGUP
|
||||
for nic in $NICSTOBRINGUP; do
|
||||
dhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$nic.pid $nic &
|
||||
dhclient -cf /etc/dhclient.conf -6 -pf /var/run/dhclient6.$nic.pid -lf /var/lib/dhclient/dhclient6.leases $nic &
|
||||
(while ! ethtool $nic | grep Link\ detected|grep yes > /dev/null; do sleep 5; done; cdhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$nic.pid $nic ) &
|
||||
(while ! ethtool $nic | grep Link\ detected|grep yes > /dev/null; do sleep 5; done; dhclient -cf /etc/dhclient.conf -6 -pf /var/run/dhclient6.$nic.pid -lf /var/lib/dhclient/dhclient6.leases $nic ) &
|
||||
done
|
||||
openssl genrsa -out /etc/xcat/certkey.pem 4096 > /dev/null 2>&1 &
|
||||
|
||||
@ -149,10 +149,21 @@ while :; do
|
||||
dest=`echo $destiny|awk -F= '{print $1}'`
|
||||
mkdir /tmp/`basename $destparameter`
|
||||
cd /tmp/`basename $destparameter`
|
||||
eval destparameter=$destparameter
|
||||
ERROR=`wget $destparameter 2>&1`
|
||||
while [ $? == 1 ] && echo $ERROR|grep -v 416; do
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo "Failed to wget $destparameter"
|
||||
echo $ERROR
|
||||
fi
|
||||
while [ $rc -ne 0 ] && echo $ERROR|grep -v 416; do
|
||||
sleep 10
|
||||
ERROR=`wget -c $destparameter 2>&1`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo "Failed to wget $destparameter"
|
||||
echo $ERROR
|
||||
fi
|
||||
done
|
||||
tar xvf `basename $destparameter`
|
||||
./runme.sh
|
||||
|
Loading…
Reference in New Issue
Block a user