Have debian support support BOOTIF autodetection
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16153 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
9a2aee8fbc
commit
f9f1d61069
@ -161,7 +161,16 @@ sub using_dracut
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sub copyAndAddCustomizations {
|
||||
my $source = shift;
|
||||
my $dest = shift;
|
||||
#first, it's simple, we copy...
|
||||
copy($source,$dest);
|
||||
#next, we apply xCAT customizations to enhance debian installer..
|
||||
chdir("$::XCATROOT/share/xcat/install/debian/initoverlay");
|
||||
system("find . |cpio -o -H newc | gzip -c - -9 >> $dest");
|
||||
}
|
||||
|
||||
sub copycd
|
||||
{
|
||||
xCAT::MsgUtils->message("S","Doing debian copycds");
|
||||
@ -720,7 +729,7 @@ sub mkinstall
|
||||
if ($docopy) {
|
||||
mkpath("$tftppath");
|
||||
copy($kernpath,"$tftppath/vmlinuz");
|
||||
copy($initrdpath,"$tftppath/initrd.img");
|
||||
copyAndAddCustomizations($initrdpath,"$tftppath/initrd.img");
|
||||
}
|
||||
|
||||
#We have a shot...
|
||||
|
@ -0,0 +1,9 @@
|
||||
BOOTMAC=`sed -e s/.*BOOTIF=/BOOTIF=/ /proc/cmdline|cut -f 1`
|
||||
if echo $BOOTMAC|grep BOOTIF= > /dev/null; then
|
||||
BOOTMAC=`echo $BOOTMAC|sed -e s/BOOTIF=01-// -e s/-/:/g`
|
||||
for dir in /sys/class/net/*; do
|
||||
if grep -i $BOOTMAC $dir/address > /dev/null; then
|
||||
debconf-set netcfg/choose_interface `basename $dir`
|
||||
fi
|
||||
done
|
||||
fi
|
Loading…
Reference in New Issue
Block a user