defect 3287:avoid to running gettyset for sles11 and higher
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14889 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b09d4b62d0
commit
e5f6a985ee
@ -1258,7 +1258,12 @@ EOMS
|
||||
close($inifile);
|
||||
open($inifile,">"."/tmp/xcatinitrd.$$/bin/netstart");
|
||||
print $inifile "#!/bin/bash \n";
|
||||
print $inifile "dhcpcd \${1} -p\n";
|
||||
if ($osver_host == 10) {
|
||||
print $inifile "dhcpcd \${1}\n";
|
||||
} else { # for sles11 or higher
|
||||
# -p is used to keep the network connection during the shutdown. Used for nfs-based statelite shutdown
|
||||
print $inifile "dhcpcd \${1} -p\n";
|
||||
}
|
||||
|
||||
#-- Bring other NICs up in /bin/netstart in initrd for NIC failover
|
||||
foreach (split /,/,$othernics) {
|
||||
@ -1511,6 +1516,14 @@ sub generic_post { # This function is meant to leave the image in a state approx
|
||||
print $cfgfile "# Short-Description: gettyset\n";
|
||||
print $cfgfile "# Description:\n";
|
||||
print $cfgfile "### END INIT INFO\n";
|
||||
print $cfgfile "VERS=`grep VERSION /etc/SuSE-release`\n";
|
||||
print $cfgfile "if [ -n \"\$VERS\" ]; then\n";
|
||||
print $cfgfile " VERNUM=`echo \$VERS|awk -F= \'{print \$2}\'|sed -e \'s/ //g\'`\n";
|
||||
print $cfgfile "fi\n";
|
||||
print $cfgfile "if [ \"\$VERNUM\" -gt 10 ]; then\n";
|
||||
print $cfgfile " exit\n";
|
||||
print $cfgfile "fi\n";
|
||||
print $cfgfile "\n";
|
||||
print $cfgfile "for i in `cat /proc/cmdline`; do\n";
|
||||
print $cfgfile ' KEY=`echo $i|cut -d= -f 1`' . "\n";
|
||||
print $cfgfile " if [ \"\$KEY\" == \"console\" -a \"\$i\" != \"console=tty0\" ]; then\n";
|
||||
|
Loading…
Reference in New Issue
Block a user