Revert "refs #809 fix redir, change prefix of messages"

This reverts commit a2e12e6b6e.
browser
Natalia Serrano 2024-11-20 13:51:28 +01:00 committed by Vadim Troshchinskiy
parent df50635618
commit 22e15aa862
2 changed files with 18 additions and 18 deletions

View File

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

View File

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