[OpenWrt-Devel] [PATCH] base-files: Really check path in get_mac_binary

Matthias Schiffer mschiffer at universe-factory.net
Sun Jul 7 19:02:16 EDT 2019


On 7/4/19 11:28 PM, Adrian Schmutzler wrote:
> 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 at adrianschmutzler.de>

This was applied already, but it seems the logic is reversed now?

Regards,
Matthias


> ---
>  package/base-files/files/lib/functions/system.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190708/28588750/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list