summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/init/defaultTESTING.sh
blob: 7a258588de17fd5cadcad87be1f253ad24bc8028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

/etc/init.d/ssh restart
#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1

ethtool -s eth0 wol g


# 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

echo -ne "og\nog\n" | passwd root

#TODO  => activacion de modo escritura en REPO

if [ $ogactiveadmin == "true" ]
then 
	export boot=admin
	umount /opt/opengnsys/images

	if [ "$ogprotocol" == "nfs" ]
	then 
		mount.nfs ${ROOTSERVER}:/opt/opengnsys/images /opt/opengnsys/images -o nolock
	fi
	
	if [ "$ogprotocol" == "smb" ]
	then 
	echo "montando smb"
		mount.cifs //${ROOTSERVER}/ogimages /opt/opengnsys/images -o user=opengnsys,pass=og
	echo mount.cifs //${ROOTSERVER}/ogimages /opt/opengnsys/images -o user=opengnsys,pass=og
	
	fi
fi
# Arranque de OpenGnSys Client.
if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then

	
    echo "$MSG_LAUNCHCLIENT modo cliente full"
    $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d 5
fi

# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
#if [ "$boot" == "admin" ]; then
    bash
#fi