aboutsummaryrefslogtreecommitdiffstats
path: root/init/serial.conf
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-12-03 14:37:12 -0500
committerBill Nottingham <notting@redhat.com>2009-12-03 14:37:12 -0500
commitdac32879b0de17d721457801fac65604f937ef00 (patch)
treedb117621e728b4141cdf538e10ec53d731d81e42 /init/serial.conf
parent79b2b232cb34f7df3e440968240975e44c4b8fc7 (diff)
downloadinitscripts-dac32879b0de17d721457801fac65604f937ef00.tar
initscripts-dac32879b0de17d721457801fac65604f937ef00.tar.gz
initscripts-dac32879b0de17d721457801fac65604f937ef00.tar.bz2
initscripts-dac32879b0de17d721457801fac65604f937ef00.tar.xz
initscripts-dac32879b0de17d721457801fac65604f937ef00.zip
Coalesce the multiple rcX and ttyX jobs into single files.
Adjust other jobs accordingly. Use a configuration parameter for what ttys to start.
Diffstat (limited to 'init/serial.conf')
-rw-r--r--init/serial.conf16
1 files changed, 8 insertions, 8 deletions
diff --git a/init/serial.conf b/init/serial.conf
index 660e93bd..9d6ad0ef 100644
--- a/init/serial.conf
+++ b/init/serial.conf
@@ -12,31 +12,31 @@
# on serial even if it's not the console, create your own event by copying
# /etc/event.d/tty[2-6], and changing the getty line in that file.
-start on fedora.serial-console-available *
+start on fedora.serial-console-available DEV=*
stop on runlevel [016]
-instance
+instance $DEV
pre-start script
while /bin/true ; do
- LANG=C /sbin/initctl status rcS | grep -wq "rcS (stop) waiting" && break
+ LANG=C /sbin/initctl status rcS | grep -wq "rcS stop/waiting" && break
sleep 1
done
while /bin/true ; do
runlevel=$(/sbin/runlevel | /bin/awk '{ print $2 }')
case "$runlevel" in
2|3|4|5)
- LANG=C /sbin/initctl status rc$runlevel | grep -wq "rc$runlevel (stop) waiting" && break
+ LANG=C /sbin/initctl status rc$runlevel | grep -wq "rc$runlevel stop/waiting" && break
;;
*)
;;
esac
sleep 1
done
- /sbin/securetty $1
+ /sbin/securetty $DEV
end script
-exec /sbin/agetty /dev/$1 $2 vt100-nav
+exec /sbin/agetty /dev/$DEV $SPEED vt100-nav
post-stop script
- if [ "$UPSTART_EVENT" != "${UPSTART_EVENT##fedora.serial-console-available}" ]; then
- initctl emit --no-wait fedora.serial-console-available $1 $2
+ if [ "$UPSTART_EVENTS" != "${UPSTART_EVENTS##fedora.serial-console-available}" ]; then
+ initctl emit --no-wait fedora.serial-console-available DEV=$DEV SPEED=$SPEED
fi
end script