36 lines
653 B
Bash
36 lines
653 B
Bash
|
#!/bin/bash
|
||
|
#
|
||
|
#%stage: device
|
||
|
#%depends: fcoe
|
||
|
#
|
||
|
|
||
|
#
|
||
|
# Check if DCBX is active for FCoE traffic
|
||
|
#
|
||
|
dcbd_check_app_fcoe() {
|
||
|
local if=$1
|
||
|
local dcberr=1
|
||
|
|
||
|
. /etc/fcoe/cfg-${if}
|
||
|
if [ "$DCB_REQUIRED" = "yes" ] ; then
|
||
|
echo "active"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
if [ "${root_fcoe}" ] ; then
|
||
|
dcb_status=$(dcbd_check_app_fcoe $fcoe_vif)
|
||
|
if [ "$dcb_status" = "active" ] ; then
|
||
|
root_dcbd=1
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
save_var root_dcbd
|
||
|
|
||
|
if [ "${root_dcbd}" ] ; then
|
||
|
mkdir -p ${tmp_mnt}/var/lib/lldpad
|
||
|
if [ -f /var/lib/lldpad/lldpad.conf ] ; then
|
||
|
# copy the dcbd configuration
|
||
|
cp -p /var/lib/lldpad/lldpad.conf ${tmp_mnt}/var/lib/lldpad
|
||
|
fi
|
||
|
fi
|