95fcoe: silence lldpad warnings

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>
master
Daniel Molkentin 2017-12-15 18:29:01 +01:00
parent d066fcc3fb
commit d71c9ee286
1 changed files with 2 additions and 2 deletions

View File

@ -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