diff --git a/xCAT-nbroot/overlay/etc/init.d/S10autodetect b/xCAT-nbroot/overlay/etc/init.d/S10autodetect index 1e5041466..3f0c14b1e 100755 --- a/xCAT-nbroot/overlay/etc/init.d/S10autodetect +++ b/xCAT-nbroot/overlay/etc/init.d/S10autodetect @@ -77,14 +77,14 @@ NEEDVETH=0; for dir in /proc/device-tree/vdevice/l-lan*; do if [ -d $dir ]; then NEEDVETH=1; fi done -if [ $NEEDVETH == 1 ]; then +if [ $NEEDVETH = 1 ]; then modprobe ibmveth fi NEEDEHEA=0; for dir in /proc/device-tree/lhea*; do if [ -d $dir ]; then NEEDEHEA=1; fi done -if [ $NEEDEHEA == 1 ]; then +if [ $NEEDEHEA = 1 ]; then modprobe ehea fi @@ -96,10 +96,10 @@ done -let extrat=0 -until [ $extrat == 80 -o -z "$NICSTOWAIT" ]; do +((extrat=0)) +until [ $extrat = 80 -o -z "$NICSTOWAIT" ]; do sleep 1 - let extrat=extrat+1 + ((extrat=extrat+1)) for nic in $NICSTOWAIT; do if ifconfig $nic|grep "inet addr"; then NICSTOWAIT=`echo $NICSTOWAIT|sed -e s/$nic//` @@ -107,7 +107,7 @@ until [ $extrat == 80 -o -z "$NICSTOWAIT" ]; do echo "Warning: $nic took more than 45 seconds to receive DHCP reply, spanning-tree may not be configured well, examine switch configuration" >> /etc/motd echo "Warning: $nic took more than 45 seconds to receive DHCP reply, spanning-tree may not be configured well, examine switch configuration" fi - elif [ $extrat == 15 ]; then + elif [ $extrat = 15 ]; then if ethtool $nic | grep "Link detected: no"; then echo "$nic did not have any link when bringing up network" echo "$nic did not have any link when bringing up network" >> /etc/motd diff --git a/xCAT-nbroot/overlay/etc/init.d/S11stunnel b/xCAT-nbroot/overlay/etc/init.d/S11stunnel index 23b1b5fee..5f003a462 100755 --- a/xCAT-nbroot/overlay/etc/init.d/S11stunnel +++ b/xCAT-nbroot/overlay/etc/init.d/S11stunnel @@ -6,7 +6,7 @@ XCATPORT=3001 killall stunnel > /dev/null 2>&1 for parm in `cat /proc/cmdline`; do key=`echo $parm|awk -F= '{print $1}'` - if [ "$key" == "xcatd" ]; then + if [ "$key" = "xcatd" ]; then XCATDEST=`echo $parm|awk -F= '{print $2}'` XCATPORT=`echo $XCATDEST|awk -F: '{print $2}'` fi @@ -22,12 +22,12 @@ if [ ! -z "$XCATDEST" ]; then echo 'connect='$XCATDEST >> /etc/stunnel/stunnel.conf fi if [ -r /tmp/dhcpserver ]; then - let i=400; + ((i=400)); for srv in `cat /tmp/dhcpserver`; do echo "[xcatd$i]" >> /etc/stunnel/stunnel.conf echo "accept=127.0.0.1:$i" >> /etc/stunnel/stunnel.conf echo "connect="$srv":"$XCATPORT >> /etc/stunnel/stunnel.conf - let i=i+1 + ((i=i+1)) done fi mkdir -p /usr/var/run/stunnel