[OpenWrt-Devel] [PATCH v2] lantiq: fall back to a more appropriate default dsl firmware

Andre Heider a.heider at gmail.com
Sat Dec 19 02:50:56 EST 2015


Hi,

On Fri, Dec 11, 2015 at 10:36 AM, John Crispin <blogic at openwrt.org> wrote:
>> @@ -69,11 +72,12 @@ start_service() {
>>       eval "xtse_adsl=\"\${xtse_adsl_$annex}\""
>>       if [ "${xtse_adsl}" ]; then
>>               xtse=$xtse_adsl
>> +             [ -z "${firmware}" ] && eval "firmware=/lib/firmware/\${fw_adsl_$annex}"
>
> do we need an eval here ? firmware=/lib/firmware/\${fw_adsl_${annex}}
> should work just aswell without spawning a subshell. ... (does eval
> spawn a subshell these days ?)

that's just based on the first line seen in this hunk.

But I just tried.
Using "firmware=/lib/firmware/\${fw_adsl_${annex}}" yields
"/lib/firmware/${fw_adsl_b}" as value, so a missing substitution, and
without the "$" quoting, "firmware=/lib/firmware/${fw_adsl_${annex}}",
the shell errors out with "syntax error: bad substitution".

So it appears we need that eval. Unless the coffee didn't yet kick in
and I'm having a brain fart :)

Regards,
Andre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list