]> 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, 25 Mar 2014 14:31:00 +0000 (15:31 +0100)
modules.d/95fcoe/fcoe-up.sh
modules.d/95fcoe/module-setup.sh

index 511c554a967e002fabf3eb947c1fb3755f90e779..dd4535889f736f1c242c51f3d3e2f59bf9cdc0e5 100755 (executable)
@@ -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
index c502ba003c3f08abe93726c030c235e1f9e739b9..9a52c008377416a9bffb6b53b4d5eb9a4828be58 100755 (executable)
@@ -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"