From: Adrian Schmutzler Date: Thu, 4 Jul 2019 21:28:44 +0000 (+0200) Subject: base-files: Really check path in get_mac_binary X-Git-Tag: v18.06.5~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6ee6c97ded2d8de72373e25020b11f6484959fdb;p=oweals%2Fopenwrt.git base-files: Really check path in get_mac_binary Currently, path argument is only checked for being not empty. This changes behavior to actually check whether path exists. Signed-off-by: Adrian Schmutzler --- diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 7ed62804a0..df671465be 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 [ -z "$path" ]; then + if [ -e "$path" ]; then echo "get_mac_binary: file $path not found!" >&2 return fi