I have image and I need installer version of this image.
In installer version differs from cunsumers version by one line in /etc/xdg/weston/weston.ini
and other passwords of root and user.
What is better way of generation two images with minor differences?
I have created in my layer
layer/recipes-core/images
another file
image-installer.bb
similar to
image-consumer.bb
And want to choose version by typing bitbake image-installer(consumer)
and in image-installer.bb
I have add lines for changing passwords:
EXTRA_USERS_PARAMS = "usermod -P user password;"
But how should I change /etc/xdg/wayland/weston.ini
?
I add to image-installer.bb
lines
do_install_append() {
install -D -p ${WORKDIR}/weston_for_installer.ini ${D}${sysconfdir}/xdg/weston/weston.ini
#or
sed -i "/\[shell\]/apanel-position=none" ${D}${sysconfdir}/xdg/weston/weston.ini
}
but this lines does not changes anything
First of all and regarding the handling of the 2 images themselve, I would create a common class from which inherit both of your image recipes, something like that :
From here, there is perhaps multiple solutions but the most simple is to modify the rootfs after its complete creation. You can do it in image recipes using the ROOTFS_POSTPROCESS_COMMAND helper. You can also manage user creation/modification from this recipe:
image-installer.bb