00check-network-cable fails with bad variable name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown-extra (Ubuntu) |
Fix Released
|
Undecided
|
Javier Fernández-Sanguino |
Bug Description
Running ifup manually with my network configuration gives this error:
# ifup --verbose eth0
Configuring interface eth0=eth0 (inet6)
run-parts --exit-on-error --verbose /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.
sysctl -q -e -w net.ipv6.
sysctl -q -e -w net.ipv6.
sysctl -q -e -w net.ipv6.
ip link set dev eth0 up
run-parts --exit-on-error --verbose /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
/etc/network/
run-parts: /etc/network/
Failed to bring up eth0
Running 00check-
# IFACE=eth0 dash -x 00check-
+ rc=/etc/
+ [ ! -r /etc/default/
[snip]
+ check_status_
+ local status=0
+ grep Link detected
+ /sbin/ethtool eth0
+ local LINK= Link detected: yes
00check-
The code is saying to define a local variable called "detected:"; this
name comes from the output of the grep in line 72.
The solution is to declare LINK and assign to it in separate steps,
which I do in the attached patch.
I also remove the "true" (:) command from the original:
local LINK=$($ETHTOOL "$IFACE" 2>&1 | grep "Link detected" || :)
because it serves no purpose, as far as I can see.
(See also Debian bug 758798:
https:/
The attachment "00check- network- cable.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]