Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Jacob Kroon <jacob.kroon@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] update-rc.d.bbclass: Fix host/target test in postinst
Date: Sun, 27 Oct 2013 16:08:12 +0100	[thread overview]
Message-ID: <20131027150812.GG3709@jama> (raw)
In-Reply-To: <1382827017-724-1-git-send-email-jacob.kroon@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

On Sun, Oct 27, 2013 at 12:36:57AM +0200, Jacob Kroon wrote:
> When running the postinst script I get a shell warning:
> 
> sh: argument expected
> 
> and the service is never stopped. This patch fixes the warning
> message and stops the service.
> 
> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
> ---
>  meta/classes/update-rc.d.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index e14659d..835b717 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -16,7 +16,7 @@ updatercd_postinst() {
>  # test if there is a previous init script there, ie, we are updating the package
>  # if so, we stop the service and remove it before we install from the new package
>  if type update-rc.d >/dev/null 2>/dev/null; then
> -	if [ -z "$D" -a `test -f "${INIT_D_DIR}/${INITSCRIPT_NAME}"` ]; then
> +	if [ -z "$D" -a "test -f ${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then

I guess you want

+	if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then

here

>  		${INIT_D_DIR}/${INITSCRIPT_NAME} stop
>  	fi
>  	if [ -n "$D" ]; then
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

      parent reply	other threads:[~2013-10-27 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-26 22:36 [PATCH] update-rc.d.bbclass: Fix host/target test in postinst Jacob Kroon
2013-10-27  7:18 ` Hans Beckerus
2013-10-27  7:25   ` Jacob Kroon
2013-10-27  7:51     ` Hans Beckerus
2013-10-27  8:17       ` Hans Beckérus
2013-10-27 15:08 ` Martin Jansa [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=20131027150812.GG3709@jama \
    --to=martin.jansa@gmail.com \
    --cc=jacob.kroon@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox