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