diff options
author | kiyoto hashida <khashida@redhat.com> | 2008-04-04 06:30:13 +0000 |
---|---|---|
committer | kiyoto hashida <khashida@redhat.com> | 2008-04-04 06:30:13 +0000 |
commit | 3631313d2900180c868e645cbd739d11177a9fc4 (patch) | |
tree | a7e75bdfc0ec9caaa1602ca6d22c35841ac5ac43 /event.d/serial | |
parent | 0af9a7de74367e1989f3d22d042a935a02e1f7bd (diff) | |
parent | 2394cb257250b03adac84b76115901a0da10f835 (diff) | |
download | initscripts-3631313d2900180c868e645cbd739d11177a9fc4.tar initscripts-3631313d2900180c868e645cbd739d11177a9fc4.tar.gz initscripts-3631313d2900180c868e645cbd739d11177a9fc4.tar.bz2 initscripts-3631313d2900180c868e645cbd739d11177a9fc4.tar.xz initscripts-3631313d2900180c868e645cbd739d11177a9fc4.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/initscripts
Diffstat (limited to 'event.d/serial')
-rw-r--r-- | event.d/serial | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/event.d/serial b/event.d/serial index 6c29af04..80695338 100644 --- a/event.d/serial +++ b/event.d/serial @@ -3,6 +3,20 @@ 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 + /sbin/securetty $1 +end script exec /sbin/agetty /dev/$1 $2 vt100-nav post-stop script if [ "$UPSTART_EVENT" != "${UPSTART_EVENT##fedora.serial-console-available}" ]; then |