public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "[ext] Dalamagkidis,
	Konstantinos" <konstantinos.dalamagkidis@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] Do not clobber policy-rc.d if it already exists
Date: Wed, 11 Sep 2019 10:24:38 +0200	[thread overview]
Message-ID: <8350982c-8551-f65c-537b-cd1b9d945351@siemens.com> (raw)
In-Reply-To: <20190911081906.16662-1-konstantinos.dalamagkidis@siemens.com>

On 11.09.19 10:19, [ext] Dalamagkidis, Konstantinos wrote:
> We had the problem that our policy-rc.d was removed by the chroot-setup
> script. This proposed patch uses the mechanism used for the
> start-stop-daemon.

Your signed-off line is missing, to declare https://developercertificate.org.

> ---
>   meta/recipes-core/isar-bootstrap/files/chroot-setup.sh | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh b/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh
> index f84f63a..4150011 100644
> --- a/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh
> +++ b/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh
> @@ -78,6 +78,9 @@ chroot_setup() {
>   	# Create a policy-rc.d to stop maintainer scripts using invoke-rc.d
>   	# from running init scripts. In case of maintainer scripts that do not
>   	# use invoke-rc.d, add a dummy start-stop-daemon.
> +	if [ -e "/${TARGET}/sbin/policy-rc.d" ]; then
> +		divert "${TARGET}" /sbin/policy-rc.d
> +	fi
>   	cat > "/${TARGET}/usr/sbin/policy-rc.d" <<-EOF
>   		#!/bin/sh
>   		exit 101
> @@ -114,7 +117,7 @@ chroot_cleanup() {
>   
>   	check_target "${TARGET}" || return 1
>   
> -	rm -f "/${TARGET}/usr/sbin/policy-rc.d"
> +	undivert "${TARGET}" /usr/sbin/policy-rc.d
>   	undivert "${TARGET}" /sbin/start-stop-daemon
>   	if [ -x "/${TARGET}/sbin/initctl.REAL" ]; then
>   		undivert "${TARGET}" /sbin/initctl
> 

Seems reasonable to me.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2019-09-11  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  8:19 Dalamagkidis, Konstantinos
2019-09-11  8:24 ` Jan Kiszka [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=8350982c-8551-f65c-537b-cd1b9d945351@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=konstantinos.dalamagkidis@siemens.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox