refs #1161 adds some echos and tests
parent
a2e12e6b6e
commit
d720a057fc
|
@ -31,6 +31,7 @@ echo "qindel: ind ($ind)" 1>&2
|
|||
# Buscar el dispositivo del índice.
|
||||
dev=""
|
||||
for f in /sys/class/net/*/uevent; do
|
||||
echo "qindel: considering file ($f)" 1>&2
|
||||
source $f
|
||||
let aux=$IFINDEX-1
|
||||
if [ "$ind" = "$INTERFACE" -o "$ind" = $aux ]; then echo "qindel: ind ($ind) == INTERFACE ($INTERFACE) -o ind ($ind) == aux ($aux), setting dev to ($INTERFACE)" 1>&2; dev="$INTERFACE"; fi
|
||||
|
@ -632,7 +633,7 @@ ogConfigureLoopback()
|
|||
#*/ ##
|
||||
ogConfigureNetworking()
|
||||
{
|
||||
#echo "ogConfigureNetworking: Buscando interfaz a configurar DEVICE"
|
||||
echo "qindel: ogConfigureNetworking: Buscando interfaz a configurar DEVICE"
|
||||
if [ -n "${BOOTIF}" ]
|
||||
then
|
||||
#echo " variable BOOTIF exportada con pxelinux.0 con valor $BOOTIF"
|
||||
|
@ -697,11 +698,13 @@ fi
|
|||
# Activamos la interfaz antes de configurar.
|
||||
ip address flush $DEVICE
|
||||
ip link set dev $DEVICE up
|
||||
echo "qindel: Carrier detected, configuring $DEVICE"
|
||||
# Si no se detecta señal portadora volver a configurar.
|
||||
sleep 1
|
||||
CARRIER=$(cat /sys/class/net/${DEVICE}/carrier)
|
||||
if [ "$CARRIER" != "1" ]
|
||||
then
|
||||
echo "qindel: Carrier not detected, trying ogConfigureNetworking again"
|
||||
ogConfigureNetworking
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue