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:
jbjohnso 2013-05-01 20:20:36 +00:00
parent 9a2aee8fbc
commit f9f1d61069
2 changed files with 20 additions and 2 deletions

View File

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

View File

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