diff options
author | Bill Nottingham <notting@redhat.com> | 2009-12-09 16:12:26 -0500 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2009-12-09 16:12:26 -0500 |
commit | 12dcbfe79bbc89b23f775bfd847eb53ec17b2971 (patch) | |
tree | de4e95b14ec6c0eb0b22450e70861e8c953cfeee /init/serial.conf | |
parent | 307e970174f12e4a808684151f132df1677c3999 (diff) | |
parent | 5df584569b80bb8977f181e16b0de47fb4df08f1 (diff) | |
download | initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.gz initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.bz2 initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.xz initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.zip |
Merge branch 'upstart-0.6.0-branch'
Diffstat (limited to 'init/serial.conf')
-rw-r--r-- | init/serial.conf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/init/serial.conf b/init/serial.conf new file mode 100644 index 00000000..21aab580 --- /dev/null +++ b/init/serial.conf @@ -0,0 +1,25 @@ +# Automatically start a configured serial console +# +# How this works: +# +# On boot, a udev helper examines /dev/console. If a serial console is the +# primary console (last console on the commandline in grub), the event +# 'fedora.serial-console-available <port name> <speed>' is emitted, which +# triggers this script. It waits for the runlevel to finish, ensures +# the proper port is in /etc/securetty, and starts the getty. +# +# 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/init/tty.conf, and changing the getty line in that file. + +start on fedora.serial-console-available DEV=* and stopped rc RUNLEVEL=[2345] +stop on runlevel [016] + +instance $DEV +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 + initctl emit --no-wait fedora.serial-console-available DEV=$DEV SPEED=$SPEED + fi +end script |