olsr: hotplug: fix a wrong grep (never successful) in olsrd_interface_already_in_config()
authorBastian Bittorf <bb@npl.de>
Sun, 12 Feb 2017 19:41:04 +0000 (20:41 +0100)
committerBastian Bittorf <bb@npl.de>
Sun, 12 Feb 2017 19:41:04 +0000 (20:41 +0100)
olsrd/files/olsrd.hotplug.sh

index 99e834e..ee41a2e 100755 (executable)
@@ -15,14 +15,14 @@ olsrd_list_configured_interfaces()
                        ;;
                esac
 
-               i=$(( $i + 1 ))
+               i=$(( i + 1 ))
        } done
 }
 
 olsrd_interface_already_in_config()
 {
        # e.g.: 'Interface "eth0.1" "eth0.2" "wlan0"'
-       if grep -s ^'Interface ' '/var/etc/$OLSRD.conf' | grep -q "\"$DEVICE\""; then
+       if grep -s ^'Interface ' "/var/etc/$OLSRD.conf" | grep -q "\"$DEVICE\""; then
                logger -t olsrd_hotplug -p daemon.debug "[OK] already_active: '$INTERFACE' => '$DEVICE'"
                return 0
        else