aboutsummaryrefslogtreecommitdiffstats
path: root/config/includes.chroot/lib/live/config/9999-serial_console
blob: 8ade5da5126ed9e3719ef385687e48ccfdbe2469 (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
#!/bin/sh

STATEFILE=/var/lib/live/config/serialconsole

Serialconsole ()
{
	# Checking that we haven't already run
	if [ -e ${STATEFILE} ]
	then
		return
	fi
	
	echo -n " serial console"
	
	Configure_serialconsole
}

Configure_serialconsole ()
{
	# Note unusual delimiters
    # This *fixes*, but does not necessarily enable...
	sed -i -e "s|\(T0:.*\?/dev/\)\(tty\)\(.*\?/dev/\)\(tty\)\(.*\)|\1\2S0\3\4S0\5|" /etc/inittab
    tail /etc/inittab
	init q

	# Creating state file
	touch ${STATEFILE}
}

Serialconsole