lldpad is a system-wide process, which must be started only once.
So we should be separate it from fcoe-up, as it might be called
several times.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
netdriver=${netdriver##*/}
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
# wait for lldpad to be ready
i=0
while [ $i -lt 60 ]; do
i=$(($i+1))
done
- # on some systems lldpad needs some time
- # sleep until we find a better solution
- sleep 30
-
while [ $i -lt 60 ]; do
dcbtool sc "$netif" dcb on && break
info "Retrying to turn dcb on"
--- /dev/null
+#!/bin/bash
+
+# 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
+# wait for lldpad to be ready
+i=0
+while [ $i -lt 60 ]; do
+ lldptool -p && break
+ info "Waiting for lldpad to be ready"
+ sleep 1
+ i=$(($i+1))
+done
inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up"
inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd"
inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"
+ inst_hook pre-trigger 03 "$moddir/lldpad.sh"
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
dracut_need_initqueue
}