Fixed the hang issue of reboot/shutdown a nfs-based statelite node

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14633 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2012-12-12 08:07:33 +00:00
parent db9d0474a1
commit 64edcd07cd
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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) {