netboot: add BOOTIF support

The IPAPPEND option in the pxelinux config file can be used
to pass information about the boot interface to the booted
Linux kernel.

The support for this option was missing and could lead to
installation failures, e.g. using kickstart.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Viktor Mihajlovski
2018-06-28 11:36:59 +02:00
committed by Jan Höppner
parent c856f28e11
commit 7247a61e0b
2 changed files with 5 additions and 0 deletions

View File

@@ -373,6 +373,7 @@ fi
kernel=$(/bin/grep -i "^[[:space:]]*kernel" /tmp/config | sed "s/^[[:space:]]*kernel[[:space:]]*//I")
initrd=$(/bin/grep -i "^[[:space:]]*initrd" /tmp/config | sed "s/^[[:space:]]*initrd[[:space:]]*//I")
append=$(/bin/grep -i "^[[:space:]]*append" /tmp/config | sed "s/^[[:space:]]*append[[:space:]]*//I")
ipappend=$(/bin/grep -i "^[[:space:]]*ipappend" /tmp/config | sed "s/^[[:space:]]*ipappend[[:space:]]*//I")
if [ -z "$kernel" ]
then
@@ -396,6 +397,9 @@ if [ -z "$append" ]; then
echo "Kexec load: kexec -l /tmp/kernel $INITRD"
kexec -l /tmp/kernel $INITRD
else
if [ "$ipappend" = "2" ]; then
$append="$append BOOTIF=01-$ifaddr"
fi
echo "Kexec load: kexec -l /tmp/kernel $INITRD --append=\"$append\""
kexec -l /tmp/kernel $INITRD --append="$append"
fi