Package: ifupdown-extra
Version: 0.19
Severity: normal
Dear Maintainer,
00check-network-cable does not work with dash, which starting from
Squeeze is installed as the default /bin/sh. The error reported when
bringing up the interface is:
/etc/network/if-up.d/00check-network-cable: 64: local: detected:: bad variable
name
run-parts: /etc/network/if-up.d/00check-network-cable exited with return code 2
The problem seems to be related to the "local" command; the man page
says:
This should appear as the first statement of a function[...]
Changing the function to (moving local declarations at the top):
check_status_ethtool () {
local status=0
local LINK
LINK=`$ETHTOOL $IFACE 2>&1 | grep "Link detected"`
fixes the error, but I'm not 100% sure that it's the correct approach.
Other functions are also affected.
The script works fine when run using bash.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ifupdown-extra depends on:
ii bind9-host [host] 1:9.7.3.dfsg-1+b1
ii iproute 20110629-1
ii iputils-arping 3:20101006-1+b1
ii iputils-ping [ping] 3:20101006-1+b1
ii net-tools 1.60-24.1
ii netcat 1.10-39
ii netcat-openbsd [netcat] 1.89-4
ii netcat-traditional [netcat] 1.10-39
Versions of packages ifupdown-extra recommends:
ii ethtool 1:3.0-1
ifupdown-extra suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]