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

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 c3758e7 was 3d00dd9b, checked in by adv <adv@…>, 14 years ago

version 1.0.2 #420 compatible con OG v2 etc/init/default

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2259 a21b9725-9963-47de-94b9-378ad31fedc9

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