浏览代码

package/netplug: fix quoting of ${NETWORKING} in init script

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>
Thomas Claveirole 6 年之前
父节点
当前提交
1b0dfb7603
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      package/netplug/S29netplug

+ 1 - 1
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