package/netplug: fix quoting of ${NETWORKING} in init script
authorThomas Claveirole <thomas.claveirole@green-communications.fr>
Thu, 15 Nov 2018 13:48:17 +0000 (14:48 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 20 Nov 2018 07:56:32 +0000 (08:56 +0100)
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>
package/netplug/S29netplug

index 66459061b38d466e69f84709df359a44c17d3bc9..cef0e6a9453266590db126b08b120880c7dec7f1 100755 (executable)
@@ -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