Add ifname= argument for persistent netdev names

ifname=<interface>:<MAC>
Assign network device name <interface> (ie eth0) to the NIC with MAC <MAC>.
Note that if you use this option you *must* specify an ifname= argument
for all interfaces used in ip= or fcoe= arguments
master
Hans de Goede 2009-09-14 11:42:52 +02:00 committed by Harald Hoyer
parent 5c3f5746bb
commit 68f28d6976
5 changed files with 11 additions and 3 deletions

View File

@ -256,6 +256,12 @@ explicit network configuration
.B rd_NO_PLYMOUTH
do not start plymouth. This will not work with encrypted partitions.

.TP
.B ifname=<interface>:<MAC>
Assign network device name <interface> (ie eth0) to the NIC with MAC <MAC>.
Note that if you use this option you \fBmust\fR specify an ifname= argument
for all interfaces used in ip= or fcoe= arguments

.SH Misc
.TP
.B rdblacklist=<drivername>

View File

@ -4,10 +4,12 @@ inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot"
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
inst "$moddir/dhclient.conf" "/etc/dhclient.conf"
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
inst_hook cmdline 99 "$moddir/parse-ip-opts.sh"
inst_hook cmdline 98 "$moddir/parse-bridge.sh"
inst_hook cmdline 99 "$moddir/parse-ifname.sh"
inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"

# TODO ifcfg config style is redhat specific, this should probably

View File

@ -29,7 +29,7 @@ fix_bootif() {
# If we have to handle multiple interfaces, handle only them.
elif [ -n "$IFACES" ] ; then
for iface in $IFACES ; do
printf 'ACTION=="add", SUBSYSTEM=="net", KERNEL=="%s", RUN+="/sbin/ifup $env{INTERFACE}"\n' "$iface"
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/ifup $env{INTERFACE}"\n' "$iface"
done

# Default: We don't know the interface to use, handle all

View File

@ -9,6 +9,6 @@
if [ -n "$fcoe_mac" ] ; then
printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_mac" "$fcoe_dcb"
else
printf 'ACTION=="add", SUBSYSTEM=="net", KERNEL=="%s", RUN+="/sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
fi
} > /etc/udev/rules.d/60-fcoe.rules

View File

@ -11,7 +11,7 @@
#
# Examples:
# fcoe=eth0:nodcb
# fcoe=4A:3F:4C:04:F8:D7:nodcb
# fcoe=4a:3f:4c:04:f8:d7:nodcb

[ -z "$fcoe" ] && fcoe=$(getarg fcoe=)