From dac32879b0de17d721457801fac65604f937ef00 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 3 Dec 2009 14:37:12 -0500 Subject: Coalesce the multiple rcX and ttyX jobs into single files. Adjust other jobs accordingly. Use a configuration parameter for what ttys to start. --- init/serial.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'init/serial.conf') 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 -- cgit v1.2.1