Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] netplug (/etc/init.d/S29netplug): Fix the quoting of ${NETWORKING}.
Date: Tue, 20 Nov 2018 08:57:56 +0100	[thread overview]
Message-ID: <20181120085756.40fc677c@windsurf.home> (raw)
In-Reply-To: <20181115134818.11190-1-thomas.claveirole@green-communications.fr>

Hello,

On Thu, 15 Nov 2018 14:48:17 +0100, Thomas Claveirole wrote:
> Since 4adaa581b27dc27298eb7cc421ee8f530f88e18e, S29netplug looks for
> /etc/default/network instead of /etc/sysconfig/network.  When this
> file exists but does not define $NETWORKING, the script fails on line
> 29 with something like:
> 
> /etc/init.d/S29netplug: 29: [: =: unexpected operator
> 
> Fix quoting so this error no longer happens.
> 
> Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
> ---
>  package/netplug/S29netplug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug
> index 66459061b3..6c344662bb 100755
> --- a/package/netplug/S29netplug
> +++ b/package/netplug/S29netplug
> @@ -26,7 +26,7 @@ if [ -f /etc/default/network ]; then
>  	. /etc/default/network
>  
>  	# Check that networking is up.
> -	[ ${NETWORKING} = "no" ] && exit 0
> +	[ "$NETWORKING" = no ] && exit 0

I don't think it was really necessary to remove the double quotes
around "no", and to remove the curly braces to reference the variable.
So I've added those back, tweaked the commit title and applied to
master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-11-20  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 13:48 [Buildroot] [PATCH 1/1] netplug (/etc/init.d/S29netplug): Fix the quoting of ${NETWORKING} Thomas Claveirole
2018-11-20  7:57 ` Thomas Petazzoni [this message]
2018-11-26 16:21 ` Peter Korsgaard

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=20181120085756.40fc677c@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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