base-files: Fix path check in get_mac_binary
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 8 Jul 2019 08:17:28 +0000 (10:17 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 9 Jul 2019 21:05:51 +0000 (23:05 +0200)
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>
package/base-files/files/lib/functions/system.sh

index df67146..9b9d03d 100644 (file)
@@ -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