From: Harald Hoyer Date: Tue, 25 Mar 2014 14:28:19 +0000 (+0100) Subject: fcoe: wait for lldpad to be ready X-Git-Tag: 038~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aaf6ccc837d7e16fa8c0c259d107832a578ff89;p=thirdparty%2Fdracut.git fcoe: wait for lldpad to be ready --- diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh index 511c554a9..dd4535889 100755 --- a/modules.d/95fcoe/fcoe-up.sh +++ b/modules.d/95fcoe/fcoe-up.sh @@ -28,8 +28,14 @@ if [ "$dcb" = "dcb" ]; then # are to kill it and start a new lldpad to take over. Data is transfered # between the 2 using a shm segment lldpad -d - # stupid tools, need sleep - sleep 1 + # 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 dcbtool sc "$netif" dcb on sleep 1 dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh index c502ba003..9a52c0083 100755 --- a/modules.d/95fcoe/module-setup.sh +++ b/modules.d/95fcoe/module-setup.sh @@ -21,7 +21,7 @@ installkernel() { # called by dracut install() { - inst_multiple ip dcbtool fipvlan lldpad readlink + inst_multiple ip dcbtool fipvlan lldpad readlink lldptool mkdir -m 0755 -p "$initdir/var/lib/lldpad"