Add dcb support to dracut's FCoE support (rh563794)

Note that there are still some patches queued upstream for fcoe-utils to
enable it to work with the new lldpad and to add support to fipvlan to
bring up FCoE connections without requiring fcoemon to run.

The invocations of the various tools as in this patch should be final though,
see the discussion in:
http://bugzilla.redhat.com/show_bug.cgi?id=563794

This is the second revision of this patch, which no longer adds /etc/fcoe
to the initrd as that is not needed.
master
Hans de Goede 2010-03-15 11:21:29 +01:00 committed by Harald Hoyer
parent f6458b80ef
commit 37b14e7295
3 changed files with 18 additions and 4 deletions

View File

@ -6,6 +6,8 @@
# Note currently only nodcb is supported, the dcb option is reserved for # Note currently only nodcb is supported, the dcb option is reserved for
# future use. # future use.


PATH=$PATH:/sbin:/usr/sbin

# Huh? Missing arguments ?? # Huh? Missing arguments ??
[ -z "$1" -o -z "$2" ] && exit 1 [ -z "$1" -o -z "$2" ] && exit 1


@ -13,4 +15,14 @@ netif=$1
dcb=$2 dcb=$2


/sbin/ip link set "$netif" up /sbin/ip link set "$netif" up
if [ "$dcb" = "dcb" ]; then
# Note lldpad will stay running after switchroot, the system initscripts
# are to kill it and start a new lldpad to take over. Data is transfered
# between the 2 using a shm segment
lldpad -d
dcbtool sc "$netif" dcb on
dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
fipvlan "$netif" -c -s
else
echo -n "$netif" > /sys/module/fcoe/parameters/create echo -n "$netif" > /sys/module/fcoe/parameters/create
fi

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash


dracut_install ip dracut_install ip dcbtool fipvlan

inst lldpad
mkdir -p "$initdir/var/lib/lldpad"


inst "$moddir/fcoe-up" "/sbin/fcoe-up" inst "$moddir/fcoe-up" "/sbin/fcoe-up"
inst_hook pre-udev 60 "$moddir/fcoe-genrules.sh" inst_hook pre-udev 60 "$moddir/fcoe-genrules.sh"

View File

@ -39,8 +39,7 @@ parse_fcoe_opts() {


parse_fcoe_opts parse_fcoe_opts


# currently only nodcb is supported if [ "$fcoe_dcb" != "nodcb" -a "$fcoe_dcb" != "dcb" ] ; then
if [ "$fcoe_dcb" != "nodcb" ] ; then
die "Invalid FCoE DCB option: $fcoe_dcb" die "Invalid FCoE DCB option: $fcoe_dcb"
fi fi