From e03b9981bdb6041402da6910fcd448cb270df690 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Wed, 20 Nov 2024 13:51:36 +0100 Subject: [PATCH] Revert "refs #809 debug init scripts" This reverts commit 6dddc6ba8b1357684dacef1479882da4cb6664fa. --- .../etc/initramfs-tools/scripts/ogfunctions | 20 +++---------------- includes/etc/initramfs-tools/scripts/oginit | 4 ---- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/includes/etc/initramfs-tools/scripts/ogfunctions b/includes/etc/initramfs-tools/scripts/ogfunctions index 26538ca..4d96f7e 100644 --- a/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/includes/etc/initramfs-tools/scripts/ogfunctions @@ -19,7 +19,6 @@ #*/ ## ogGetNetworkDevice () { -echo "nati: in ogGetNetworkDevice()" # Mantener retrocompatibilidad con interfaces antiguas tipo eth. case "$1" in eth0) ind=1 ;; @@ -27,13 +26,12 @@ case "$1" in eth2) ind=3 ;; *) ind="$1" ;; esac -echo "nati: ind ($ind)" # 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 + [ "$ind" = "$INTERFACE" -o "$ind" = $aux ] && dev="$INTERFACE" done [ -n "$dev" ] && echo "$dev" } @@ -52,28 +50,18 @@ done #*/ ## ogExportKernelParameters () { - echo "nati: in ogExportKernelParameters()" GLOBAL="cat /proc/cmdline" for i in `${GLOBAL}` do - echo "nati: 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)" - export $i - fi + echo $i | grep "=" > /dev/null && export $i done # Sustituir índice de interfaz de red por su dispositivo. DEVIND=$(echo "$ip" | cut -f6 -d:) - echo "nati: 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()" 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}" + [ -n "$DEVICE" ] && export ip="$PRE:$DEVICE:${POST:-none}" fi return 0 } @@ -131,7 +119,6 @@ fi #*/ ## ogExportVarEnvironment () { - echo "nati: in ogExportVarEnvironment" export CFGINITRD="/tmp/initrd.cfg" OGPROTOCOL="${ogprotocol:-smb}" [ "$ogunit" != "" ] && OGUNIT="/$ogunit" @@ -191,7 +178,6 @@ ogExportVarEnvironment () #$OGSERVERSHARE #$OGSERVERLOG #$OGSERVERIMAGES - echo "nati: exiting ogExportVarEnvironment" return 0 } diff --git a/includes/etc/initramfs-tools/scripts/oginit b/includes/etc/initramfs-tools/scripts/oginit index 381698f..2c88fdc 100755 --- a/includes/etc/initramfs-tools/scripts/oginit +++ b/includes/etc/initramfs-tools/scripts/oginit @@ -54,18 +54,14 @@ 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" 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" [ -n "$video" ] && ogChangeVideoResolution - echo "nati: Checking OpenGnsys Environmnet: calling ogExportVarEnvironment" log_success_msg "Checking OpenGnsys Environmnet" ogExportVarEnvironment - echo "nati: stayin alive" [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N " [ $? == 0 ] && sh || echo " " ogConfigureRamfs