aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-12-03 14:47:57 -0500
committerBill Nottingham <notting@redhat.com>2009-12-03 14:47:57 -0500
commit857a4cd8f1f761ad19c3df868d79430cc53324d8 (patch)
tree3709898d53d98ead55a4669680930d71744bc044
parent70ae78109bf06c6666253895965ed2a70fd621a4 (diff)
downloadinitscripts-857a4cd8f1f761ad19c3df868d79430cc53324d8.tar
initscripts-857a4cd8f1f761ad19c3df868d79430cc53324d8.tar.gz
initscripts-857a4cd8f1f761ad19c3df868d79430cc53324d8.tar.bz2
initscripts-857a4cd8f1f761ad19c3df868d79430cc53324d8.tar.xz
initscripts-857a4cd8f1f761ad19c3df868d79430cc53324d8.zip
Remove the dirty dirty hack in favor of an 'and' clause.
(This better work now.)
-rw-r--r--init/serial.conf23
1 files changed, 3 insertions, 20 deletions
diff --git a/init/serial.conf b/init/serial.conf
index 9d6ad0ef..387f3bc8 100644
--- a/init/serial.conf
+++ b/init/serial.conf
@@ -10,30 +10,13 @@
#
# If your serial console is not the primary console, or you want a getty
# 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.
+# /etc/event.d/tty, and changing the getty line in that file.
-start on fedora.serial-console-available DEV=*
+start on fedora.serial-console-available DEV=* and stopped rc RUNLEVEL=[2345]
stop on runlevel [016]
instance $DEV
-pre-start script
- while /bin/true ; do
- 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
- ;;
- *)
- ;;
- esac
- sleep 1
- done
- /sbin/securetty $DEV
-end script
+pre-start exec /sbin/securetty $DEV
exec /sbin/agetty /dev/$DEV $SPEED vt100-nav
post-stop script
if [ "$UPSTART_EVENTS" != "${UPSTART_EVENTS##fedora.serial-console-available}" ]; then