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 4d39cda22..e9993198e 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -569,3 +569,7 @@ if grep --quiet --no-messages "Dummy resolv.conf" "$MNTDIR/etc/resolv.conf"; the /bin/cat /etc/resolv.conf > $MNTDIR/etc/resolv.conf fi +# Copy the fake network interface configuration file to /etc/sysconfig/network to handle +# the issue of reboot nfs-based statelite +/bin/cp /tmp/ifcfg-* $MNTDIR/etc/sysconfig/network + diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index e23820158..3c4e8c237 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -1014,6 +1014,11 @@ while ! ifconfig | grep inet; do sleep 1 netstart \$IFACE done +# Add a fake interface configuration file for the boot interface to skip the +# ifdown of the interface during the reboot/shutdown to skip the fs broken of +# nfs based file system +echo "STARTMODE=nfsroot" > /tmp/ifcfg-\$IFACE + ip addr add dev lo 127.0.0.1/8 ip link set lo up cd / @@ -1288,7 +1293,7 @@ EOMS close($inifile); open($inifile,">"."/tmp/xcatinitrd.$$/bin/netstart"); print $inifile "#!/bin/bash \n"; - print $inifile "dhcpcd \${1}\n"; + print $inifile "dhcpcd \${1} -p\n"; #-- Bring other NICs up in /bin/netstart in initrd for NIC failover foreach (split /,/,$othernics) {