nfsroot follow ifcfg settings for boot protocol

master
Thomas Blume 2019-06-19 15:15:57 +02:00 committed by Daniel Molkentin
parent dc86c12c45
commit 9cc1b76087
1 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,12 @@ cmdline() {
printf 'ifname=%s:%s ' ${ifname} ${ifmac} printf 'ifname=%s:%s ' ${ifname} ${ifmac}
fi fi


printf 'ip=%s:static\n' ${ifname} bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname)
if [ $bootproto ]; then
printf 'ip=%s:%s ' ${ifname} ${bootproto}
else
printf 'ip=%s:static ' ${ifname}
fi
} }


# called by dracut # called by dracut