source: client/shared/etc/init/default.sh @ c3c7cb3

opengnsys-1.0.2
Last change on this file since c3c7cb3 was c3c7cb3, checked in by ramon <ramongomez@…>, 13 years ago

Congelar versión 1.0.2 en tags/opengnsys-1.0.2 (modifica #446).

git-svn-id: https://opengnsys.es/svn/tags/opengnsys-1.0.2@2405 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 1.7 KB
RevLine 
[914d834]1#!/bin/bash
2
[d343849]3# TODO Separar esta sección en otro script
[c3c7cb3]4
5
[d343849]6# Lanzar servicios complementarios del cliente.
[c3c7cb3]7PASS=$(grep "^[         ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
8        sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
9PASS=${PASS:-"og"}
10echo -ne "$PASS\n$PASS\n" | passwd root 2>/dev/null
11
12# Inicio del servidor sshd
[a7a957e]13/usr/sbin/sshd
[c3c7cb3]14
15# Desactivado apagado de monitor
[914d834]16#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
[c3c7cb3]17
18# Activado WOL en la interfaz usada en arranque pxe
[d343849]19ethtool -s $DEVICE wol g 2>/dev/null
[383fe4b]20
[7af582e]21# Fichero de registro de incidencias (en el servidor; si no, en local).
[077dd7c5]22OPENGNSYS=${OPENGNSYS:-/opt/opengnsys}
[7af582e]23OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/${ogGetIpAdderss},log}
24if ! touch $OGLOGFILE 2>/dev/null; then
25    OGLOGFILE=/var/log/opengnsys.log
26fi
[d343849]27LOGLEVEL=5
[914d834]28
[c3c7cb3]29#Facilitando el entorno Og desde ssh
[c7a6ded]30cp $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
[c3c7cb3]31
32
33
34########## PRUEBAS
[9e05221]35# Crear menú por defecto para el cliente
36generateMenuDefault
[c7a6ded]37
[c3c7cb3]38# Matando plymount para inicir browser o shell
39pkill -9 plymouthd
40
41[ -f /opt/opengnsys/scripts/runhttplog.sh ] && /opt/opengnsys/scripts/runhttplog.sh
42
43########## FIN PRUEBAS
44
45# Arranque de OpenGnSys Client daemon (web services).
46if [ -x $OPENGNSYS/job_executer/init.d/job_executer ]; then
47    echo "Running Opengnsys client daemon (web services)"
48    $OPENGNSYS/job_executer/init.d/job_executer restart
49fi
50
51# Arranque de OpenGnSys Client daemon (socket).
[077dd7c5]52if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then
[11956a9]53    echo "$MSG_LAUNCHCLIENT"
[d343849]54    [ $ogactiveadmin == "true" ] && boot=admin
55    $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL
[077dd7c5]56fi
57
[7af582e]58# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
59if [ "$boot" == "admin" ]; then
60    bash
61fi
Note: See TracBrowser for help on using the repository browser.