summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/init/default.sh
diff options
context:
space:
mode:
Diffstat (limited to 'client/shared/etc/init/default.sh')
-rwxr-xr-xclient/shared/etc/init/default.sh39
1 files changed, 6 insertions, 33 deletions
diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh
index d1fea1c9..7b443e23 100755
--- a/client/shared/etc/init/default.sh
+++ b/client/shared/etc/init/default.sh
@@ -1,47 +1,18 @@
#!/bin/bash
+# Proceso general de arranque de OpenGnSys Client.
-# TODO Separar esta sección en otro script
-
-
-# Lanzar servicios complementarios del cliente.
-PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
- sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
-PASS=${PASS:-"og"}
-echo -ne "$PASS\n$PASS\n" | passwd root 2>/dev/null
-
-# Inicio del servidor sshd
-/usr/sbin/sshd
-
-# Desactivado apagado de monitor
-#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
-
-# Activado WOL en la interfaz usada en arranque pxe
-ethtool -s $DEVICE wol g 2>/dev/null
# Fichero de registro de incidencias (en el servidor; si no, en local).
OPENGNSYS=${OPENGNSYS:-/opt/opengnsys}
-OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/${ogGetIpAdderss},log}
+OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAdderss).log}
if ! touch $OGLOGFILE 2>/dev/null; then
OGLOGFILE=/var/log/opengnsys.log
fi
LOGLEVEL=5
-#Facilitando el entorno Og desde ssh
-cp $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
-
-
-
-########## PRUEBAS
-# Crear menú por defecto para el cliente
-generateMenuDefault
-
# Matando plymount para inicir browser o shell
pkill -9 plymouthd
-[ -f /opt/opengnsys/scripts/runhttplog.sh ] && /opt/opengnsys/scripts/runhttplog.sh
-
-########## FIN PRUEBAS
-
# Arranque de OpenGnSys Client daemon (web services).
if [ -x $OPENGNSYS/job_executer/init.d/job_executer ]; then
echo "Running Opengnsys client daemon (web services)"
@@ -50,8 +21,8 @@ fi
# Arranque de OpenGnSys Client daemon (socket).
if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then
- echo "$MSG_LAUNCHCLIENT"
- [ $ogactiveadmin == "true" ] && boot=admin
+ echo "${MSG_LAUNCHCLIENT:-.}"
+ [ $ogactiveadmin == "true" ] && boot="admin"
$OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL
fi
@@ -59,3 +30,5 @@ fi
if [ "$boot" == "admin" ]; then
bash
fi
+
+