]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: silence lldpad warnings
authorDaniel Molkentin <dmolkentin@suse.com>
Fri, 15 Dec 2017 17:29:01 +0000 (18:29 +0100)
committerDaniel Molkentin <dmolkentin@suse.com>
Fri, 15 Dec 2017 17:51:49 +0000 (18:51 +0100)
When lldpad is not running, any calls to 'dcbtool' will be printing
out a warning. As it perfectly legit to have FCoE running without
DCB we should not be printing out the error.

Signed-off-by: Hannes Reinecke <hare@suse.com>
modules.d/95fcoe/module-setup.sh

index aae158f28d1c22c7b6e1a1b9d86d19ddbefca113..539cd7c168000952e2426d4ff9525f0e6ec6890c 100755 (executable)
@@ -49,11 +49,11 @@ cmdline() {
         d=$(cd -P $c; echo $PWD)
         i=${d%/*}
         read mac < ${i}/address
-        s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
+        s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
         if [ -z "$s" ] ; then
             p=$(get_vlan_parent ${i})
             if [ "$p" ] ; then
-                s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
+                s=$(dcbtool gc ${p} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
             fi
         fi
         if [ "$s" = "on" ] ; then