fuel-agent/contrib/fuel_bootstrap/files/trusty/etc/init/ttyS0.conf

19 lines
451 B
Plaintext

# ttyS0 - getty
start on stopped rc RUNLEVEL=[12345]
stop on runlevel [!12345]
respawn
pre-start script
# exit if console not present on ttyS0
cat /proc/cmdline | grep -q "console=ttyS0"
end script
script
# get console speed if provded with "console=ttySx,38400"
SPEED=$(cat /proc/cmdline | sed -e"s/^.*console=ttyS0[,]*\([^ ]*\)[ ]*.*$/\1/g")
# or use 9600 console speed as default
exec /sbin/getty -L ${SPEED:-9600} ttyS0
end script