source: client/shared/etc/init/default.sh @ 841ce50

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 841ce50 was e2131bc, checked in by adv <adv@…>, 14 years ago

version 1.0.2 #421 revertido cambios en la version 1.0.2, la funcionalidad está en version1.0-tickets

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

  • Property mode set to 100755
File size: 1.3 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.
[1895428]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
[e2131bc]11
12#inicio del servidor sshd
[d04dbaa]13/usr/sbin/sshd
[e2131bc]14
15#desactivando apagado de monitor
[914d834]16#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
[e2131bc]17
18#activando 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
[eb9424f]29#facilitando el entorno Og desde ssh
30cp $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
[e2131bc]31
[5eb61a6]32# Crear menú por defecto para el cliente
33generateMenuDefault
[eb9424f]34
[1ab18778]35#Matando plymount para inicir browser o shell
36pkill -9 plymouthd
37
[7af582e]38# Arranque de OpenGnSys Client.
[077dd7c5]39if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then
[11956a9]40    echo "$MSG_LAUNCHCLIENT"
[d343849]41    [ $ogactiveadmin == "true" ] && boot=admin
42    $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL
[077dd7c5]43fi
44
[7af582e]45# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
46if [ "$boot" == "admin" ]; then
47    bash
48fi
Note: See TracBrowser for help on using the repository browser.