diff options
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 |