wireless: fix _wireless_add_process
authorGünther Kelleter <guenther.kelleter@devolo.de>
Wed, 8 Feb 2017 15:47:22 +0000 (16:47 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sat, 11 Feb 2017 20:46:58 +0000 (21:46 +0100)
The pid is in $1, not $pid.
Use proper test condition for nonmatching exe warning.

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
scripts/netifd-wireless.sh

index 87d13cac3ef7542bc51076dcc6187cf33a21ac6e..106c49d2b6d89ef6c5ea0e8d47a23e8fe56c6389 100644 (file)
@@ -163,8 +163,8 @@ _wireless_add_process() {
        json_add_int pid "$1"
        json_add_string exe "$exe"
        [ -n "$3" ] && json_add_boolean required 1
-       exe2="$(readlink -f /proc/$pid/exe)"
-       [ "$exe" = "$exe2" ] && echo "WARNING (wireless_add_process): executable path $exe does not match process $1 path ($exe2)"
+       exe2="$(readlink -f /proc/$1/exe)"
+       [ "$exe" != "$exe2" ] && echo "WARNING (wireless_add_process): executable path $exe does not match process $1 path ($exe2)"
        _wdev_notify
 }