defect 3324448: generate the ifcfg-x configuration file when running genimage -i, but keep the ONBOOT=no to skip the break of nfs-based system
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10097 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a873b2bcc2
commit
7a15992239
@ -1090,10 +1090,11 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
open($cfgfile,">","$rootimg_dir/etc/resolv.conf");
|
||||
print $cfgfile "#Dummy resolv.conf to make boot cleaner";
|
||||
close($cfgfile);
|
||||
#this code breaks statelite see defect 3324448
|
||||
#open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
#print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
#close($cfgfile);
|
||||
# Create the ifcfg-x file for diskless node. But keep the ONBOOT=no
|
||||
# to skip the break of nfs-based boot
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
print $cfgfile "ONBOOT=no\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
close($cfgfile);
|
||||
foreach (split /,/,$othernics) {
|
||||
if (/^$/) { next; }
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$_");
|
||||
|
@ -1319,13 +1319,14 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
open($cfgfile,">","$rootimg_dir/etc/resolv.conf");
|
||||
print $cfgfile "#Dummy resolv.conf to make boot cleaner";
|
||||
close($cfgfile);
|
||||
# TODO
|
||||
#this code breaks statelite see defect 3324448
|
||||
#if ($prinic) {
|
||||
# open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
# print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
# close($cfgfile);
|
||||
#}
|
||||
|
||||
# Create the ifcfg-x file for diskless node. But keep the ONBOOT=no
|
||||
# to skip the break of nfs-based boot
|
||||
if ($prinic) {
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
print $cfgfile "ONBOOT=no\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
close($cfgfile);
|
||||
}
|
||||
foreach (split /,/,$othernics) {
|
||||
if (/^$/) { next; }
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$_");
|
||||
|
@ -1324,12 +1324,13 @@ sub generic_post { # This function is meant to leave the image in a state approx
|
||||
open($cfgfile,">","$rootimg_dir/etc/resolv.conf");
|
||||
print $cfgfile "#Dummy resolv.conf to make boot cleaner";
|
||||
close($cfgfile);
|
||||
#this code breaks statelite see defect 3324448
|
||||
# if ($prinic) {
|
||||
# open($cfgfile,">","$rootimg_dir/etc/sysconfig/network/ifcfg-$prinic");
|
||||
# print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=$prinic\nSTARTMODE=auto\n";
|
||||
# close($cfgfile);
|
||||
# }
|
||||
# Create the ifcfg-x file for diskless node. But keep the ONBOOT=no
|
||||
# to skip the break of nfs-based boot
|
||||
if ($prinic) {
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network/ifcfg-$prinic");
|
||||
print $cfgfile "ONBOOT=no\nBOOTPROTO=dhcp\nDEVICE=$prinic\nSTARTMODE=auto\n";
|
||||
close($cfgfile);
|
||||
}
|
||||
|
||||
foreach (split /,/,$othernics) {
|
||||
next if (/^$/);
|
||||
|
@ -763,10 +763,11 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
open($cfgfile,">","$rootimg_dir/etc/resolv.conf");
|
||||
print $cfgfile "#Dummy resolv.conf to make boot cleaner";
|
||||
close($cfgfile);
|
||||
#this code breaks statelite see defect 3324448
|
||||
#open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
#print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
#close($cfgfile);
|
||||
# Create the ifcfg-x file for diskless node. But keep the ONBOOT=no
|
||||
# to skip the break of nfs-based boot
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
print $cfgfile "ONBOOT=no\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
close($cfgfile);
|
||||
foreach (split /,/,$othernics) {
|
||||
if (/^$/) { next; }
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$_");
|
||||
|
@ -1092,10 +1092,11 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
open($cfgfile,">","$rootimg_dir/etc/resolv.conf");
|
||||
print $cfgfile "#Dummy resolv.conf to make boot cleaner";
|
||||
close($cfgfile);
|
||||
#this code breaks statelite see defect 3324448
|
||||
# open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
# print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
# close($cfgfile);
|
||||
# Create the ifcfg-x file for diskless node. But keep the ONBOOT=no
|
||||
# to skip the break of nfs-based boot
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$prinic");
|
||||
print $cfgfile "ONBOOT=no\nBOOTPROTO=dhcp\nDEVICE=$prinic\n";
|
||||
close($cfgfile);
|
||||
foreach (split /,/,$othernics) {
|
||||
if (/^$/) { next; }
|
||||
open($cfgfile,">","$rootimg_dir/etc/sysconfig/network-scripts/ifcfg-$_");
|
||||
|
Loading…
Reference in New Issue
Block a user