diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index fa6549464..12aa8f9eb 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -167,8 +167,11 @@ ResolveLinks () { i=0 while read type path do - ELIST[$i]="$type $path"; - i=$[ $i+1 ]; + if [ -n "$path" ]; then + # Only add non empty entries + ELIST[$i]="$type $path"; + i=$[ $i+1 ]; + fi done num=${#ELIST[@]} diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh index c004d623c..cb0e1f3c6 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh @@ -120,6 +120,11 @@ if [ ! -z $SNAPSHOTSERVER ]; then fi # TODO: handle the dhclient/resolv.conf/ntp, etc + +# On systems with no /bin/bash, create a link to /usr/bin/bash +if [ ! -e /bin/bash ] && [ -e /usr/bin/bash ]; then + ln -s /usr/bin/bash /bin/bash +fi logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." echo "Enable localdisk ..." $NEWROOT/etc/init.d/localdisk @@ -153,7 +158,8 @@ function getdevfrommac() { done } -bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//) +# get boot interface name and generate network/ifcfg- file +bootif=$(ls /tmp/net.*.up|grep -v ":"|sed -e s/.*net\.// -e s/\.up//) cat < $NEWROOT/etc/sysconfig/network/ifcfg-$bootif BOOTPROTO='dhcp' STARTMODE='auto' diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 9d939aa55..3f7afe628 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -92,7 +92,6 @@ check:output=~64 bytes from $$CN cmd:lsdef -l $$CN | grep status check:rc==0 check:output=~booted -cmd:cat /var/log/consoles/$$CN.log cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d @@ -107,7 +106,7 @@ cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "echo "test"> /test.statelite" check:rc!=0 cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi -cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi +cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.statelite;fi cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi check:rc==0 end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index 8126aca2b..30bd6f188 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -85,7 +85,6 @@ check:output=~64 bytes from $$CN cmd:lsdef -l $$CN | grep status check:rc==0 check:output=~booted -cmd:cat /var/log/consoles/$$CN.log cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d