How to run /etc/init/ttys0.conf automatically at startup?
From here
respawn
console none
start on (local-filesystems)
stop on [!12345]
script
exec start ttyS0
end script
Should work i suspect. else, replace start tty0 with a script that starts what you want to start
mudasirahanger
I'm a software developer who relishes authoring Java and Python, hacking on Android and toying with AppEngine. I have a penchant for development and a passion for the business side of software. In between all the work, I contribute to a number of open-source projects, learn to master the art of cooking Asian cuisine and try to stay sane while learning to fly my Align Trex-600 Nitro Heli.
Updated on September 18, 2022Comments
-
mudasirahanger over 1 year
I have a script at
/etc/init/ttyS0.conf
. I'm configuring a KVM guest for Serial Console access so even if the network interface is broken, I can still access it via the serial connection.I can start the
ttyS0
by runningsudo start ttyS0
and it works just fine until I reboot. Upon rebooting the system, thettyS0
isn't running anymore.How can I get this script to to tun automatically at startup?
Thanks
Here's what my script looks like:
# ttyS0 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -L 115200 ttyS0 xterm
-
Thalys over 12 yearsactually, it uses upstart now, but old style init scripts ought to work
-
mudasirahanger over 12 yearsHi Journeyman, I read up upstart and it seems to be the right way to do this evn though my script is in sync with the upstart specs, it doesn't start when the system boots/restarts. Any ideas? Please have a look at my edit. I've added my script there.