X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=conf_files%2Fpl_netinit;fp=conf_files%2Fpl_netinit;h=cd48730e414c4e7b73c5aa387d1f938d59958c29;hb=f4c1f3b505c6824dbbd631a5e1a5346ef9956d71;hp=bf662d205134561f0b6abc57d31140b23cfb2f9d;hpb=6e403c637ec04ff99e2df2d4e2e1a62618649d7f;p=bootcd.git diff --git a/conf_files/pl_netinit b/conf_files/pl_netinit index bf662d2..cd48730 100644 --- a/conf_files/pl_netinit +++ b/conf_files/pl_netinit @@ -235,6 +235,17 @@ if [[ $DEFAULT_NET_CONF -eq 1 ]]; then /bin/rm -f $USED_NET_CONF fi +# initialize IPMI device +if [[ -n "$IPMI_ADDRESS" ]] ; then + echo -n "pl_netinit: initializing IPMI: " + cmd="ipnmac -i $IPMI_ADDRESS" + if [[ -n "$IPMI_MAC" ]] ; then + cmd="$cmd -m $IPMI_MAC" + fi + echo $cmd + $cmd +fi + # now, we need to find which device to use (ie, eth0 or eth1). start out # by defaulting to eth0, then see if the network configuration file specified # either a mac address (in which case we will need to find the device), or @@ -243,14 +254,14 @@ fi if [[ -n "$NET_DEVICE" ]]; then # the user specified a mac address we should use. find the network # device for it. - echo "pl_netinit: looking for a device with mac address $NET_DEVICE" + NET_DEVICE=$(tr A-Z a-z <<<$NET_DEVICE) pushd /sys/class/net for device in *; do - dev_address=`cat $device/address` - if [[ "$dev_address" == "$NET_DEVICE" ]]; then + dev_address=`cat $device/address | tr A-Z a-z` + if [ "$device" == "$NET_DEVICE" -o "$dev_address" == "$NET_DEVICE" ]; then ETH_DEVICE=$device - echo "pl_netinit: found device $ETH_DEVICE" + echo "pl_netinit: found device $ETH_DEVICE with mac address $dev_address" break fi done