All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2018.08.x] package/netplug: fix quoting of ${NETWORKING} in init script
@ 2018-11-26 16:21 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2018-11-26 16:21 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1b0dfb76037c303e4b6474d1f82f0674d5a329ca
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2018.08.x

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>
[Thomas: keep double quotes around "no", keep curly braces when
referencing the variable.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

(cherry picked from commit 5682ba9363d262a67567ed9b0531a414e6aae1bb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/netplug/S29netplug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug
index 66459061b3..cef0e6a945 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
 elif [ ! -f /etc/network/interfaces ]; then
 	# No network support
 	exit 0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-26 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 16:21 [Buildroot] [git commit branch/2018.08.x] package/netplug: fix quoting of ${NETWORKING} in init script Peter Korsgaard

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.