tags 464715 patch thanks Package: ifupdown-extra Version: 0.12 Followup-For: Bug #464715
"ifup -v" and "ifup" exports VERBOSITY value, so respecting it is a good idea. Anyway, I made atached patch for this and other issues. Please note that the shell export of VERBOSITY does not work since ifup overwrite it if the scripts are invoked via ifup/ifdown. Osamu -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.24-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/bash Versions of packages ifupdown-extra depends on: ii bind9-host [host] 1:9.4.2-3 Version of 'host' bundled with BIN ii iproute 20080108-1 Professional tools to control the ii iputils-arping 3:20071127-1 Tool to send ICMP echo requests to ii iputils-ping [ping] 3:20071127-1 Tools to test the reachability of ii net-tools 1.60-19 The NET-3 networking toolkit ii netcat 1.10-36 TCP/IP swiss army knife -- transit ii netcat-traditional [netcat] 1.10-36 TCP/IP swiss army knife Versions of packages ifupdown-extra recommends: ii ethtool 6-0 display or change ethernet card se -- no debconf information
diff -Nru ifupdown-extra-0.12-orig/debian/changelog ifupdown-extra-0.13.~pre01/debian/changelog --- ifupdown-extra-0.12-orig/debian/changelog 2007-12-28 10:34:57.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/debian/changelog 2008-02-16 08:33:56.000000000 +0900 @@ -1,3 +1,10 @@ +ifupdown-extra (0.13.~pre01) unstable; urgency=low + + * Changed default value handling to respect environment variables for + -v option of ifup works better etc. + + -- Osamu Aoki <[EMAIL PROTECTED]> Sat, 16 Feb 2008 08:28:46 +0900 + ifupdown-extra (0.12) unstable; urgency=low * Change maintainer's email address diff -Nru ifupdown-extra-0.12-orig/debian/network-test-default ifupdown-extra-0.13.~pre01/debian/network-test-default --- ifupdown-extra-0.12-orig/debian/network-test-default 2006-08-13 21:45:16.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/debian/network-test-default 2008-02-16 09:20:29.000000000 +0900 @@ -1,13 +1,14 @@ # Defaults for ifupdown-extra testing scripts # sourced by scripts at /etc/network/if-{pre-,-}up.d # installed at /etc/default/network-test by the maintainer scripts +# while respecting exported shell environment variables # Tells scripts to log to syslog the tests done before an interface # is configured. Set this to "no" if you just want to use stderr -DO_SYSLOG=yes +DO_SYSLOG=${DO_SYSLOG:-yes} # Abort scripts (do not continue) if the network link is not up -ABORT_NO_LINK=no +ABORT_NO_LINK=${ABORT_NO_LINK:-no} # Additional options that are passed to ARPING scripts # @@ -16,12 +17,12 @@ # everything is OK) since the scripts will have to wait until arping # finished before configuring an interface. Set this to 'no' if you # do not want the delay and want to skip these tests. -DO_ARPING=yes +DO_ARPING=${DO_ARPING:-yes} # # These values control how many arp pings are sent when doing ARP tests # The higher the count (or timeout) the more time it will take for those # scripts to finish but it might make it more easy to detect faulty # counditions in overloaded networks. -ARP_COUNT=2 -ARP_TIMEOUT=3 +ARP_COUNT=${ARP_COUNT:-2} +ARP_TIMEOUT=${ARP_TIMEOUT:-3} diff -Nru ifupdown-extra-0.12-orig/if-up-scripts/check-duplicate-ip ifupdown-extra-0.13.~pre01/if-up-scripts/check-duplicate-ip --- ifupdown-extra-0.12-orig/if-up-scripts/check-duplicate-ip 2007-12-19 05:11:41.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/if-up-scripts/check-duplicate-ip 2008-02-16 19:32:01.000000000 +0900 @@ -32,15 +32,16 @@ # is already in use by another system. # +# Read system default file +[ -r /etc/default/network-test ] && . /etc/default/network-test + # Defaults ARPING=/usr/bin/arping ETHTOOL=/usr/sbin/ethtool -ARP_COUNT=2 -ARP_TIMEOUT=3 -DO_SYSLOG=yes -[ -z "$VERBOSITY" ] && VERBOSITY=0 -# Read system default file -[ -r /etc/default/network-test ] && . /etc/default/network-test +ARP_COUNT=${ARP_COUNT:-2} +ARP_TIMEOUT=${ARP_TIMEOUT:-3} +DO_SYSLOG=${DO_SYSLOG:-yes} +VERBOSITY=${VERBOSITY:-0} # Do not continue if ETHTOOL is not available [ ! -x "$ARPING" ] && exit 0 diff -Nru ifupdown-extra-0.12-orig/if-up-scripts/check-gateway ifupdown-extra-0.13.~pre01/if-up-scripts/check-gateway --- ifupdown-extra-0.12-orig/if-up-scripts/check-gateway 2007-12-19 05:35:12.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/if-up-scripts/check-gateway 2008-02-16 19:32:23.000000000 +0900 @@ -37,15 +37,16 @@ # is already in use by another system. # +# Read system default file +[ -r /etc/default/network-test ] && . /etc/default/network-test + # Defaults ARPING=/usr/bin/arping ETHTOOL=/usr/sbin/ethtool -ARP_COUNT=2 -ARP_TIMEOUT=3 -DO_SYSLOG=yes -[ -z "$VERBOSITY" ] && VERBOSITY=0 -# Read system default file -[ -r /etc/default/network-test ] && . /etc/default/network-test +ARP_COUNT=${ARP_COUNT:-2} +ARP_TIMEOUT=${ARP_TIMEOUT:-3} +DO_SYSLOG=${DO_SYSLOG:-yes} +VERBOSITY=${VERBOSITY:-0} # Do not continue if ETHTOOL is not available [ ! -x "$ARPING" ] && exit 0 diff -Nru ifupdown-extra-0.12-orig/if-up-scripts/check-network-cable ifupdown-extra-0.13.~pre01/if-up-scripts/check-network-cable --- ifupdown-extra-0.12-orig/if-up-scripts/check-network-cable 2007-06-18 22:37:14.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/if-up-scripts/check-network-cable 2008-02-16 19:32:44.000000000 +0900 @@ -30,13 +30,15 @@ # http://www.gnu.org/licenses/licenses.html#TOCLGPL # +# Read system default file +[ -r /etc/default/network-test ] && . /etc/default/network-test + # Defaults ETHTOOL=/usr/sbin/ethtool MIITOOL=/sbin/mii-tool -DO_SYSLOG=yes -ABORT_NO_LINK=no -# Read system default file -[ -r /etc/default/network-test ] && . /etc/default/network-test +DO_SYSLOG=${DO_SYSLOG:-yes} +ABORT_NO_LINK=i${ABORT_NO_LINK:-no} +VERBOSITY=${VERBOSITY:-0} # Do not continue if ETHTOOL and MIITOOL is not available [ ! -x "$ETHTOOL" ] && [ ! -x "$MIITOOL" ] && exit 0 diff -Nru ifupdown-extra-0.12-orig/if-up-scripts/static-routes ifupdown-extra-0.13.~pre01/if-up-scripts/static-routes --- ifupdown-extra-0.12-orig/if-up-scripts/static-routes 2007-06-18 22:37:09.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/if-up-scripts/static-routes 2008-02-16 08:53:16.000000000 +0900 @@ -43,9 +43,11 @@ # Note: If you add the up/down in /etc/network/interfaces failure when # setting up a route breaks the interface configuration +# Defaults +VERBOSITY=${VERBOSITY:-0} + # Abort if the configuration file does not exist [ ! -r /etc/network/routes ] && exit 0 -[ -z "$VERBOSITY" ] && VERBOSITY = 0 del_static_routes() { # NOTE: We actually don't have to remove routes if downing an interface diff -Nru ifupdown-extra-0.12-orig/scripts/network-test ifupdown-extra-0.13.~pre01/scripts/network-test --- ifupdown-extra-0.12-orig/scripts/network-test 2007-10-15 06:16:58.000000000 +0900 +++ ifupdown-extra-0.13.~pre01/scripts/network-test 2008-02-16 19:58:54.000000000 +0900 @@ -75,7 +75,9 @@ while getopts ":hsv:" Option do case $Option in - h ) cat <<- EOF + v ) VERB=$OPTARG;; + s ) LOG=1;; + * ) cat <<- EOF Usage: $0 [-s][-v <num>] -s Also log messages to local3 syslog facility @@ -86,8 +88,6 @@ EOF exit 0;; - v ) VERB=$OPTARG;; - s ) LOG=1;; esac done