[OE-core] [PATCH 1/4] image.bbclass: add postinst_enable_logging
Martin Jansa
martin.jansa at gmail.com
Thu May 16 09:03:11 UTC 2013
On Thu, May 16, 2013 at 03:56:14PM +0800, Qi.Chen at windriver.com wrote:
> From: Chen Qi <Qi.Chen at windriver.com>
>
> Add a function postinst_enable_logging, so that when 'debug-tweaks'
> is in IMAGE_FEATURES, we create .enable_postinst_logging under /etc,
> which is used by run-postinst scripts to determine whether to log or
> not.
>
> [YOCTO #4262]
>
> Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
> ---
> meta/classes/image.bbclass | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 2b42e12..fc5e23c 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -175,6 +175,8 @@ MACHINE_POSTPROCESS_COMMAND ?= ""
> ROOTFS_POSTPROCESS_COMMAND_prepend = "run_intercept_scriptlets; "
> # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
> ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
> +# Enable postinst logging if debug-tweaks is enabled
> +ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
>
> # some default locales
> IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
> @@ -484,6 +486,11 @@ ssh_allow_empty_password () {
> fi
> }
>
> +# Enable postinst logging if debug-tweaks is enabled
> +postinst_enable_logging () {
cannot we use better file for this? it will be first hidden file in /etc
> + touch ${IMAGE_ROOTFS}/etc/.enable_postinst_logging
> +}
> +
> # Turn any symbolic /sbin/init link into a file
> remove_init_link () {
> if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130516/0a7ee2a8/attachment-0001.sig>
More information about the Openembedded-core
mailing list