Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Koen Kooi <koen@dominion.thruhere.net>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH v2] minicoredumper: relocate admin-binaries to sbin
Date: Wed, 11 Apr 2018 10:06:15 +0200	[thread overview]
Message-ID: <pakfhl$siq$1@blaine.gmane.org> (raw)
In-Reply-To: <1523374768-657-1-git-send-email-christophe.priouzeau@st.com>

Op 10-04-18 om 17:39 schreef Christophe PRIOUZEAU:
> Change path of minicoredumper on init/service script to /usr/sbin.
> 
> Since the commit "relocate admin-binaries to sbin" on minicoredumper,
> minicoredumper binaries are installed on /usr/sbin directory instead
> of /usr/bin.
> src/minicoredumper/Makefile.am: sbin_PROGRAMS = minicoredumper
> 
> Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
> ---
>  meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init    | 2 +-
>  meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
> index 90ef7fa..9c96e31 100644
> --- a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
> +++ b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
> @@ -22,7 +22,7 @@
>  
>  case "$1" in
>      start)
> -        echo "|/usr/bin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
> +        echo "|/usr/sbin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
>          ;;
>      stop)
>          echo "core" > /proc/sys/kernel/core_pattern
> diff --git a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
> index 851b54c..45d098f 100644
> --- a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
> +++ b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
> @@ -4,7 +4,7 @@ Description=Enable minicoredumper.
>  [Service]
>  Type=oneshot
>  RemainAfterExit=yes
> -ExecStart=/bin/sh -c '/bin/echo "|/usr/bin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
> +ExecStart=/bin/sh -c '/bin/echo "|/usr/sbin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
>  ExecStop=/bin/sh -c '/bin/echo "core" > /proc/sys/kernel/core_pattern'
>  
>  [Install]


You're trading one hardcoded entry for another, a bettter way would be to do something like

do_install_append() {
	sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g <files>
}

That would fix the situation for DISTROs where $prefix = "".



      reply	other threads:[~2018-04-11  8:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 15:39 [meta-oe][PATCH v2] minicoredumper: relocate admin-binaries to sbin Christophe PRIOUZEAU
2018-04-11  8:06 ` Koen Kooi [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='pakfhl$siq$1@blaine.gmane.org' \
    --to=koen@dominion.thruhere.net \
    --cc=openembedded-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox