#!/bin/sh -e # # The boot interface has the hardware type (using its ARP type code) # appended to the front of the mac address. # # Example: # * 01-AA-BB-CC-DD-EE-FF # for i in $(cat /proc/cmdline); do case $i in BOOTIF=*) bootif_mac=$(echo ${i#BOOTIF=??-} | tr -s '-' ':') for j in /sys/class/net/*; do if grep -q ${bootif_mac} ${j}/address; then bootif_name=${j#/sys/class/net/} debconf-set netcfg/choose_interface ${bootif_name} # Not needed for production. echo "set via pxedust: ${bootif_name}" > /var/log/pxedust break fi done break ;; *) ;; esac done