K.Mandla's blog of Linux experiences

Edgy sans inittab

Things have moved around a bit since the new Upstart system took over. It took me a while to find things too, so don’t feel bad if you’re missing the good old days of inittab.

For the time being, just remember: The tty setup is now in /etc/event.d, and each tty has its own separate file. If you’re inserting an autologin script, you’ll need to tamper with that file accordingly. All right, all right, I’ll just tell you what to put in there.

Assuming you’ve compiled the autologin executable and put it into your /usr/local/sbin/ folder, this is what should go into your /etc/event.d/tty1 file.

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5
stop on shutdown
respawn /sbin/getty -n -l /usr/local/sbin/autologin 38400 tty1

And if you’re looking for services to abandon at startup or shutdown, look inside /etc/rc0.d, /etc/rc1.d, etc. That’s where you’ll find folders for each runlevel. Rename your unwanted services to start with a lowercase k (instead of an uppercase K), and you’ll be a happy camper again.

That’s all for now. If you want any more, you’ll have to sing it yourself. … ;)