diff options
Diffstat (limited to 'client/shared/etc/init/default.sh')
-rwxr-xr-x | client/shared/etc/init/default.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh new file mode 100755 index 00000000..e5e1a34f --- /dev/null +++ b/client/shared/etc/init/default.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# TODO Separar esta sección en otro script +# Lanzar servicios complementarios del cliente. +echo -ne "og\nog\n" | passwd root +/etc/init.d/ssh restart +#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1 +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} +if ! touch $OGLOGFILE 2>/dev/null; then + OGLOGFILE=/var/log/opengnsys.log +fi +LOGLEVEL=5 + +# Arranque de OpenGnSys Client. +if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then + echo "$MSG_LAUNCHCLIENT" + [ $ogactiveadmin == "true" ] && boot=admin + $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL +fi + +# Si fallo en cliente y modo "admin", cargar shell; si no, salir. +if [ "$boot" == "admin" ]; then + bash +fi |