aboutsummaryrefslogtreecommitdiffstats
path: root/event.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-04-03 17:34:34 -0400
committerBill Nottingham <notting@redhat.com>2008-04-03 17:34:34 -0400
commit6aebc60dd20d3528ad5eee0438a4e65f02adfae0 (patch)
treee6d5fb3ee96d09109cd5c5cce6b3ef7dfb3ecede /event.d
parente3a871a31826536fa3cb52b70fed1e7e4b9c6c30 (diff)
downloadinitscripts-6aebc60dd20d3528ad5eee0438a4e65f02adfae0.tar
initscripts-6aebc60dd20d3528ad5eee0438a4e65f02adfae0.tar.gz
initscripts-6aebc60dd20d3528ad5eee0438a4e65f02adfae0.tar.bz2
initscripts-6aebc60dd20d3528ad5eee0438a4e65f02adfae0.tar.xz
initscripts-6aebc60dd20d3528ad5eee0438a4e65f02adfae0.zip
Add a crude hack to wait for runlevels to finish. (#437379)
Diffstat (limited to 'event.d')
-rw-r--r--event.d/serial12
1 files changed, 12 insertions, 0 deletions
diff --git a/event.d/serial b/event.d/serial
index 6c29af04..8751ef84 100644
--- a/event.d/serial
+++ b/event.d/serial
@@ -3,6 +3,18 @@ start on fedora.serial-console-available *
stop on runlevel [016]
instance
+pre-start script
+ 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
exec /sbin/agetty /dev/$1 $2 vt100-nav
post-stop script
if [ "$UPSTART_EVENT" != "${UPSTART_EVENT##fedora.serial-console-available}" ]; then