parent
22e15aa862
commit
e03b9981bd
|
@ -19,7 +19,6 @@
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogGetNetworkDevice ()
|
ogGetNetworkDevice ()
|
||||||
{
|
{
|
||||||
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 +26,12 @@ case "$1" in
|
||||||
eth2) ind=3 ;;
|
eth2) ind=3 ;;
|
||||||
*) ind="$1" ;;
|
*) ind="$1" ;;
|
||||||
esac
|
esac
|
||||||
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 "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
|
done
|
||||||
[ -n "$dev" ] && echo "$dev"
|
[ -n "$dev" ] && echo "$dev"
|
||||||
}
|
}
|
||||||
|
@ -52,28 +50,18 @@ done
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogExportKernelParameters ()
|
ogExportKernelParameters ()
|
||||||
{
|
{
|
||||||
echo "nati: in ogExportKernelParameters()"
|
|
||||||
GLOBAL="cat /proc/cmdline"
|
GLOBAL="cat /proc/cmdline"
|
||||||
for i in `${GLOBAL}`
|
for i in `${GLOBAL}`
|
||||||
do
|
do
|
||||||
echo "nati: considering ($i)"
|
echo $i | grep "=" > /dev/null && export $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
|
|
||||||
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 "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 "nati: PRE ($PRE) POST ($POST)"
|
|
||||||
echo "nati: calling ogGetNetworkDevice()"
|
|
||||||
DEVICE=$(ogGetNetworkDevice $DEVIND)
|
DEVICE=$(ogGetNetworkDevice $DEVIND)
|
||||||
echo "nati: got DEVICE ($DEVICE)"
|
[ -n "$DEVICE" ] && 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 +119,6 @@ fi
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogExportVarEnvironment ()
|
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 +178,6 @@ ogExportVarEnvironment ()
|
||||||
#$OGSERVERSHARE
|
#$OGSERVERSHARE
|
||||||
#$OGSERVERLOG
|
#$OGSERVERLOG
|
||||||
#$OGSERVERIMAGES
|
#$OGSERVERIMAGES
|
||||||
echo "nati: exiting ogExportVarEnvironment"
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,18 +54,14 @@ 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 "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 "nati: calling ogChangeVideoResolution"
|
|
||||||
[ -n "$video" ] && ogChangeVideoResolution
|
[ -n "$video" ] && ogChangeVideoResolution
|
||||||
echo "nati: Checking OpenGnsys Environmnet: calling ogExportVarEnvironment"
|
|
||||||
log_success_msg "Checking OpenGnsys Environmnet"
|
log_success_msg "Checking OpenGnsys Environmnet"
|
||||||
ogExportVarEnvironment
|
ogExportVarEnvironment
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue