This repository was archived by the owner on Apr 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrc.multi
More file actions
executable file
·93 lines (70 loc) · 2.2 KB
/
rc.multi
File metadata and controls
executable file
·93 lines (70 loc) · 2.2 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
#
# /etc/rc.multi
#
# terminal is not actually dumb
export TERM=mach-color
. /etc/rc.conf
. /etc/rc.d/functions
# Signals that we should pass down to runttys.
runttys_sigs='TERM INT HUP TSTP'
run_hook multi_start
# Load sysctl variables if sysctl.conf is present
[ -r /etc/sysctl.conf ] && /sbin/sysctl -q -p &>/dev/null
printhl "Starting ttys"
if [ -e /dev/vcs ]; then
settrans -fg /dev/vcs
fi
CHARMAP=`echo $LOCALE | grep "\." | sed 's/.*\.\(.*$\)/\1/'`
[ -z $CHARMAP ] && CHARMAP="ISO-8859-1"
st /dev/vcs root 600 /hurd/console --encoding=$CHARMAP
st /dev/console root 600 /hurd/term /dev/console device console
st /dev/tty1 root 666 /hurd/term /dev/tty1 hurdio /dev/vcs/1/console
st /dev/tty2 root 666 /hurd/term /dev/tty2 hurdio /dev/vcs/2/console
st /dev/tty3 root 666 /hurd/term /dev/tty3 hurdio /dev/vcs/3/console
st /dev/tty4 root 666 /hurd/term /dev/tty4 hurdio /dev/vcs/4/console
st /dev/tty5 root 666 /hurd/term /dev/tty5 hurdio /dev/vcs/5/console
st /dev/tty6 root 666 /hurd/term /dev/tty6 hurdio /dev/vcs/6/console
settrans -kc /dev/tty /hurd/magic tty
# Start daemons.
for daemon in "${DAEMONS[@]}"; do
if [ "$daemon" = "${daemon#!}" ]; then
if [ "$daemon" = "${daemon#@}" ]; then
start_daemon $daemon
else
start_daemon_bkgd ${daemon:1}
fi
fi
done
if [ -x /etc/rc.local ]; then
/etc/rc.local
fi
run_hook multi_end
# Trap certain signals and send them on to runttys. For this to work, we
# must run it asynchronously and wait for it with the `wait' built-in.
runttys_pid=0
for sig in $runttys_sigs; do
trap "kill -$sig \${runttys_pid}" $sig
done
# This program reads /etc/ttys and starts the programs it says to.
/libexec/runttys &
runttys_pid=$!
#Start up console with variables from rc.conf
if [ -n "$CONSOLEDISPLAY" ]; then
CONSOLEOPTS="$CONSOLEOPTS -d $CONSOLEDISPLAY"
if [ -n "$CONSOLEFONT" ]; then
CONSOLEOPTS="$CONSOLEOPTS --font $CONSOLEFONT"
fi
fi
if [ -n "$CONSOLEMOUSE" ]; then
CONSOLEOPTS="$CONSOLEOPTS -d $CONSOLEMOUSE --repeat=mouse"
fi
if [ -n "$CONSOLEKBD" ]; then
CONSOLEOPTS="$CONSOLEOPTS -d $CONSOLEKBD --repeat=kbd"
fi
if [ -n "$CONSOLESPEAKER" ]; then
CONSOLEOPTS="$CONSOLEOPTS -d $CONSOLESPEAKER"
fi
console $CONSOLEOPTS /dev/vcs
wait
# vim: set ts=2 noet: