#!/bin/bash type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh mac="$(getargs BOOTIF=)" mac="$(echo $mac | cut -c 4- | tr '-' ':')" if [ -n "${mac}" ]; then cat << EOF >> "${NEWROOT}/etc/sysconfig/network-scripts/ifcfg-bootnet" DEVICE=bootnet NAME=bootnet HWADDR=${mac} BOOTPROTO=dhcp ONBOOT=yes NM_CONTROLLED=yes EOF else echo "Could not parse MAC" fi