[OpenWrt-Devel] base-files: Fix path check in get_mac_binary
diff mbox series

Message ID 20190708081728.909-1-freifunk@adrianschmutzler.de
State Accepted
Headers show
Series
  • [OpenWrt-Devel] base-files: Fix path check in get_mac_binary
Related show

Commit Message

Adrian Schmutzler July 8, 2019, 8:17 a.m. UTC
Logic was inverted when changing from string check to file check.
Fix it.

Fixes: 8592602d0a88 ("base-files: Really check path in get_mac_binary")
Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

---

This needs to be fixed in master, 19.07 and 18.06.
---
 package/base-files/files/lib/functions/system.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh
index df671465be..9b9d03df7b 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/package/base-files/files/lib/functions/system.sh
@@ -4,7 +4,7 @@  get_mac_binary() {
 	local path="$1"
 	local offset="$2"
 
-	if [ -e "$path" ]; then
+	if ! [ -e "$path" ]; then
 		echo "get_mac_binary: file $path not found!" >&2
 		return
 	fi