All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] image.bbclass: add ability to set systemd default target
Date: Wed, 18 Dec 2013 15:33:43 +0800	[thread overview]
Message-ID: <52B14FD7.30006@windriver.com> (raw)
In-Reply-To: <81011ef08bf3b30e8ccdf7c9ee58b010d13dec77.1387271027.git.Qi.Chen@windriver.com>

Please drop this one.  It has some problem with live images.
I'll send out a V2.

//Chen Qi

On 12/17/2013 05:05 PM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Add ability to set the default target for systemd images.
>
> The default value for the target is derived from checking whether
> IMAGE_FEATRUES contains 'x11-base' or not. Each image could override
> this value in its own recipe. For now, we don't need to do any change,
> because all images that support graphical environment has 'x11-base'
> in its IMAGE_FEATRUES.
>
> [YOCTO #3816]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   meta/classes/image.bbclass |    8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index c595721..c8366d6 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -186,6 +186,9 @@ IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
>   ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; "
>   # Set default postinst log file
>   POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
> +# Set default target for systemd images
> +SYSTEMD_DEFAULT_TARGET ?= '${@base_contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
> +ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}'
>   
>   # some default locales
>   IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
> @@ -596,6 +599,11 @@ postinst_enable_logging () {
>   	echo "LOGFILE=${POSTINST_LOGFILE}" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst
>   }
>   
> +# Modify systemd default target
> +set_systemd_default_target () {
> +	ln -sf ${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${sysconfdir}/systemd/system/default.target
> +}
> +
>   # Turn any symbolic /sbin/init link into a file
>   remove_init_link () {
>   	if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then



      reply	other threads:[~2013-12-18  7:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17  9:05 [PATCH 0/1] image.bbclass: add ability to set systemd default target Qi.Chen
2013-12-17  9:05 ` [PATCH 1/1] " Qi.Chen
2013-12-18  7:33   ` ChenQi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B14FD7.30006@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.