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 <freifunk@adrianschmutzler.de>
openwrt-18.06
Adrian Schmutzler 2019-07-04 23:28:44 +02:00 committed by Christian Lamparter
parent aced9de9a4
commit 6ee6c97ded
1 changed files with 1 additions and 1 deletions

View File

@ -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