blob: 3bb763c91dcac817043a143508af15295e4d8966 (
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
50
51
52
53
54
55
56
57
58
|
#!/bin/sh
#
quiet=n
. /conf/tcos.conf
. /scripts/functions
. /conf/tcos-run-functions
# kill bootchart
if grep -q bootchartd /proc/cmdline ; then
/sbin/tcos-bootchartd stop
fi
TCOS_TTY=$(read_cmdline_var "ttys" "${TCOS_TTY}")
export PS1="($(hostname)@$(whoami)) # "
kill_usplash
grep -q " startx=N " /proc/cmdline && chvt 1
# empty memory cache
# from http://linux-mm.org/Drop_Caches
sync
echo 3 > /proc/sys/vm/drop_caches
# no clear
#clear
while [ ${TCOS_TTY} -ge 1 ]; do
if [ ${TCOS_TTY} = 1 ] ; then
if [ "${TCOS_TTY1_PROTECTED}" = "1" ]; then
rungetty tty${TCOS_TTY}
else
echo ""
echo ""
echo "Press enter to activate this console..."
read enter
sh
fi
else
rungetty tty${TCOS_TTY} &
fi
TCOS_TTY=$((TCOS_TTY -1))
done
while [ 1 ]; do
sh
done
exit 0
|