]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe: wait for lldpad to be ready
authorHarald Hoyer <harald@redhat.com>
Tue, 25 Mar 2014 14:28:19 +0000 (15:28 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:52:07 +0000 (11:52 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1080353

modules.d/95fcoe/fcoe-up.sh
modules.d/95fcoe/module-setup.sh

index ecb1593d922a10f174163fd45de4168519de958b..60642cfdbf3f3a175958ed95098b96d4c0680c42 100755 (executable)
@@ -31,8 +31,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
index fe8e40aa5d4973f21e713e2be60bdd8f24de031a..3ffaf5a5f2c13f823cec6da14e2d123c69479ecc 100755 (executable)
@@ -20,7 +20,7 @@ installkernel() {
 }
 
 install() {
-    inst_multiple ip dcbtool fipvlan lldpad readlink
+    inst_multiple ip dcbtool fipvlan lldpad readlink lldptool
 
     mkdir -m 0755 -p "$initdir/var/lib/lldpad"