* Jonh Wendell <[email protected]> [20.02.2013 18:41]:
> +    [ -f $DEFAULT ] && . $DEFAULT
> +    service_start /sbin/netifd $OPTION

this is not pretty, nifty and simple. (but must be!) use:

[ -f "$DEFAULT" ] && read OPTIONS <"$DEFAULT"

why should the user need to know your variable name.
this passes the content of the file as an argument.

bye, bastian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to