On Tue, 15 Mar 2016 02:58:16 -0700 debian-b...@contactdaniel.net wrote:
> Package: ifupdown-extra
> Version: 0.25
>
> On systems with dash as the default shell, the 00check-network-cable
script can exit with an error.
>
> This error can cause some network configuration in
/etc/network/interfaces to be left unprocessed. On my system, the IPv6
portion of a dual stack configuration remains unapplied.
>
> Example of the script having an error:
>
> # IFACE=eth0 dash 00check-network-cable
> 00check-network-cable: 72: local: detected:: bad variable name

I just hit the same problem recently and also looked into that script.

I'm not sure if this bashism or just sloppy programming, the fix for this
particular one is simple - just put double quotes around the expression:

    local LINK="$($ETHTOOL "$IFACE" 2>&1 | grep "Link detected" || :)"

But, looking onto the code in general it looks to me that it needs some
love, for example in the declaration section:

  ABORT_NO_LINK=i${ABORT_NO_LINK:-no}

Make whole variable useless and not working(note leading 'i', 'vi' is
evil:>)

I hope to get some time and clean up the script.

Reply via email to