Have debian support support BOOTIF autodetection

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16152 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2013-05-01 19:10:46 +00:00
parent 1ec86928e6
commit 0d857ceabf
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