refs #809 fix redir, change prefix of messages

browser
Natalia Serrano 2024-11-15 16:47:31 +01:00 committed by Vadim Troshchinskiy
parent 6a25ffd76b
commit 7c16d315dc
2 changed files with 18 additions and 18 deletions

View File

@ -19,7 +19,7 @@
#*/ ##
ogGetNetworkDevice ()
{
echo "nati: in ogGetNetworkDevice()"
echo "qindel: in ogGetNetworkDevice()" 1>&2
# Mantener retrocompatibilidad con interfaces antiguas tipo eth.
case "$1" in
eth0) ind=1 ;;
@ -27,13 +27,13 @@ case "$1" in
eth2) ind=3 ;;
*) ind="$1" ;;
esac
echo "nati: ind ($ind)"
echo "qindel: ind ($ind)" 1>&2
# Buscar el dispositivo del índice.
dev=""
for f in /sys/class/net/*/uevent; do
source $f
let aux=$IFINDEX-1
if [ "$ind" = "$INTERFACE" -o "$ind" = $aux ]; then echo "nati: ind ($ind) == INTERFACE ($INTERFACE) -o ind ($ind) == aux ($aux), setting dev to ($INTERFACE)"; 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
done
[ -n "$dev" ] && echo "$dev"
}
@ -52,28 +52,28 @@ done
#*/ ##
ogExportKernelParameters ()
{
echo "nati: in ogExportKernelParameters()"
echo "qindel: in ogExportKernelParameters()"
GLOBAL="cat /proc/cmdline"
for i in `${GLOBAL}`
do
echo "nati: considering ($i)"
echo "qindel: considering ($i)"
if echo $i | grep "=" > /dev/null; then
if echo $i | grep '\..*=' > /dev/null; then echo "nati: skipping ($i)"; continue; fi
echo "nati: exporting ($i)"
if echo $i | grep '\..*=' > /dev/null; then echo "qindel: skipping ($i)"; continue; fi
echo "qindel: exporting ($i)"
export $i
fi
done
# Sustituir índice de interfaz de red por su dispositivo.
DEVIND=$(echo "$ip" | cut -f6 -d:)
echo "nati: DEVIND ($DEVIND)"
echo "qindel: DEVIND ($DEVIND)"
if [ -n "$DEVIND" ]; then
PRE=$(echo "$ip" | cut -f1-5 -d:)
POST=$(echo "$ip" | cut -f7- -d:)
echo "nati: PRE ($PRE) POST ($POST)"
echo "nati: calling ogGetNetworkDevice()"
echo "qindel: PRE ($PRE) POST ($POST)"
echo "qindel: calling ogGetNetworkDevice()"
DEVICE=$(ogGetNetworkDevice $DEVIND)
echo "nati: got DEVICE ($DEVICE)"
[ -n "$DEVICE" ] && echo "nati: DEVICE is true, exporting ip ($PRE:$DEVICE:${POST:-none})" && export ip="$PRE:$DEVICE:${POST:-none}"
echo "qindel: got DEVICE ($DEVICE)"
[ -n "$DEVICE" ] && echo "qindel: DEVICE is true, exporting ip ($PRE:$DEVICE:${POST:-none})" && export ip="$PRE:$DEVICE:${POST:-none}"
fi
return 0
}
@ -131,7 +131,7 @@ fi
#*/ ##
ogExportVarEnvironment ()
{
echo "nati: in ogExportVarEnvironment"
echo "qindel: in ogExportVarEnvironment"
export CFGINITRD="/tmp/initrd.cfg"
OGPROTOCOL="${ogprotocol:-smb}"
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
@ -191,7 +191,7 @@ ogExportVarEnvironment ()
#$OGSERVERSHARE
#$OGSERVERLOG
#$OGSERVERIMAGES
echo "nati: exiting ogExportVarEnvironment"
echo "qindel: exiting ogExportVarEnvironment"
return 0
}

View File

@ -54,18 +54,18 @@ mountroot ()
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before get OG variables: y/N "
[ $? == 0 ] && sh || echo " "
echo "nati: Checking kernel parameters: calling ogExportKernelParameters"
echo "qindel: Checking kernel parameters: calling ogExportKernelParameters"
set -a
log_success_msg "Checking kernel parameters"
ogExportKernelParameters
# Cambiar resolución de vídeo para kernels que usan el parámetro "video".
echo "nati: calling ogChangeVideoResolution"
echo "qindel: calling ogChangeVideoResolution"
[ -n "$video" ] && ogChangeVideoResolution
echo "nati: Checking OpenGnsys Environmnet: calling ogExportVarEnvironment"
echo "qindel: Checking OpenGnsys Environmnet: calling ogExportVarEnvironment"
log_success_msg "Checking OpenGnsys Environmnet"
ogExportVarEnvironment
echo "nati: stayin alive"
echo "qindel: stayin alive"
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N "
[ $? == 0 ] && sh || echo " "
ogConfigureRamfs