summaryrefslogtreecommitdiffstats
path: root/urunlevel/my_linux/vt_manager
blob: 978f2ecfab7b825523ebbd8456071f2bb6a22aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

runlevel=`cat /etc/runlevel`

if [ -f /var/lib/misc/runlevel ]
then
    runlevel=`/var/lib/misc/runlevel`
fi

if [ "$runlevel" = "3" ]
then
    /sbin/getty 38400 tty$1
elif [ "$runlevel" = "4" ]
then
    sleep 1
    /usr/bin/openvt $1 twdm --quiet --hw=tty@/dev/tty$1,stdout,TERM=linux
    sleep 1d
elif [ "$runlevel" = "5" ]
then
    /usr/bin/openvt $1 /usr/X11R6/bin/X
    sleep 1d
fi