[oe] How to modify omap3-console-image recipe to modify /etc/inittab
Ash Charles
ashcharles at gmail.com
Wed May 5 18:36:56 UTC 2010
On Wed, May 5, 2010 at 9:28 AM, Elvis Dowson <elvis.dowson at mac.com> wrote:
> 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?
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
More information about the Openembedded-devel
mailing list