[LEDE-DEV] [PATCH netifd] wireless: fix _wireless_add_process

Günther Kelleter guenther.kelleter at devolo.de
Wed Feb 8 07:47:22 PST 2017


The pid is in $1, not $pid.
Use proper test condition for nonmatching exe warning.

Signed-off-by: Günther Kelleter <guenther.kelleter at devolo.de>
---
 scripts/netifd-wireless.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh
index 87d13ca..106c49d 100644
--- a/scripts/netifd-wireless.sh
+++ b/scripts/netifd-wireless.sh
@@ -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
 }
 
-- 
2.10.2.101.g2cc9ff1




More information about the Lede-dev mailing list