Reputation: 451
I am developing an application in beaglebone. I want to add start up scripts to my Beaglebone but I can not find /etc/inittab. I am using the image : Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.06.18.img.xz
I think in the previous versions of image there is /etc/initab but for the new distributions I could not find the inittab :/
I want to apply this : Automatic login on Angstrom Linux but I can not because there is no /etc/inittab.
Where is the inittab in new distributions.
When I write uname -r it gives: 3.2.23
Regards
Upvotes: 2
Views: 2869
Reputation: 694
inittab has been replaced by systemd
This is how I did it for the serial console. You can probably adapt it easily for tty1 by replacing "serial-getty@..." by "getty@...", but I haven't tested it.
cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]
rm /etc/systemd/system/getty.target.wants/[email protected]
ln -s /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
Create the following script file in any location (/home/root/autologin.sh in my case)
#!/bin/sh
exec /bin/login -f root
Make it executable
chmod a+x autologin.sh
Edit /etc/systemd/system/[email protected] and update the ExecStart command by adding the -n (Do not prompt the user for a login name) and -l (Invoke the specified login_program instead of /bin/login) options.
ExecStart=-/sbin/agetty -n -l /home/root/autologin.sh -s %I 115200
Upvotes: 2