How to modify omap3-console-image recipe to modify /etc/inittab
Hi,
How can I modify the omap3-console-image recipe to modify the /etc/inittab file from
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
to
c1:12345:respawn:/sbin/agetty -n -l /usr/sbin/autologin 38400 tty1 linux
after the rootfs is fully created?
Best regards,
Elvis
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Elvis Dowson
Hi,
How can I modify the omap3-console-image recipe
There's no such recipe in OE. Without the recipe I can't really say what the best way to do it is. I think patching sysvinit would be the best option, otherwise you'll loose the changes on package upgrades
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL4a2mMkyGM64RGpERAlZIAJ9W3acFGhZSLvlayvgLua5a4uePAACfVwCS Ke4AUh2NFtscc+IUX8pujHM=
=z3Nr
-----END PGP SIGNATURE-----
Quoted 8 lines · Elvis Dowson
How can I modify the omap3-console-image recipe to modify the
/etc/inittabfile fromc1:12345:respawn:/sbin/agetty 38400 tty1 linux
toc1:12345:respawn:/sbin/agetty -n -l
/usr/sbin/autologin38400 tty1 linuxafter the rootfs is fully created?
I made an addition to my autologin recipe that does this:
pkg_postinst_${PN} () {
sed 's_S:2345:respawn:/sbin/getty_S:2345:respawn:/sbin/getty -n -l/usr/bin/autologin_' /etc/inittab > inittab.tmp
mv inittab.tmp /etc/inittab
passwd -d root
echo 'NOTE: remove the password from the root account'
}
pkg_prerm_${PN} () {
sed 's_ -n -l /usr/bin/autologin__' /etc/inittab > inittab.tmp mv inittab.tmp /etc/inittab
echo 'NOTE: there is still no password on the root account'
}
Does this make sense? I don't know if this is the ideal way to do it but it seems to work for me.
-Ash