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 373b70ba1..f9696b3e7 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -539,3 +539,7 @@ ResolveLinks #cp -r -a ${DEFAULT}/* /.snapshot/tmpfs/ # foo +# 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 7d76d6371..696abccd1 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -990,6 +990,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 / @@ -1253,7 +1258,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) {