source: client/shared/etc/init/default.sh @ 4a29eb5

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 4a29eb5 was 300fbd9, checked in by ramon <ramongomez@…>, 14 years ago

Versión 1.0.2: cambio de clave correcto en clientes nuevos y antiguos (modifica #433)

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2285 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
[28986cb]4
5
[d343849]6# Lanzar servicios complementarios del cliente.
[300fbd9]7PASS=$(grep "^[         ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
[1895428]8        sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
9PASS=${PASS:-"og"}
10echo -ne "$PASS\n$PASS\n" | passwd root 2>/dev/null
[e2131bc]11
[3d00dd9b]12# Inicio del servidor sshd
[d04dbaa]13/usr/sbin/sshd
[e2131bc]14
[3d00dd9b]15# Desactivado apagado de monitor
[914d834]16#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
[e2131bc]17
[3d00dd9b]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
[3d00dd9b]29#Facilitando el entorno Og desde ssh
[eb9424f]30cp $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
[e2131bc]31
[167d856]32
33
34########## PRUEBAS
[5eb61a6]35# Crear menú por defecto para el cliente
36generateMenuDefault
[eb9424f]37
[3d00dd9b]38# Matando plymount para inicir browser o shell
[1ab18778]39pkill -9 plymouthd
40
[167d856]41[ -f /opt/opengnsys/scripts/runhttplog.sh ] && /opt/opengnsys/scripts/runhttplog.sh
42
43########## FIN PRUEBAS
44
[3d00dd9b]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.