Package: ifupdown
Version: 0.7.2
Severity: normal
Tags: patch

Dear Maintainer,

When you run "service networking restart/start/reload" it not use
guessnet, if it installed, because it can't find it, (PATH=/sbin:/bin)

I'v add to PATH "/usr/sbin", because guessnet is there, and this fix
issue.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.6.5macbook-pro-custom-v0.1 (SMP w/4 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 depends on:
ii  dpkg         1.16.9
ii  initscripts  2.88dsf-32
ii  iproute      20120521-3
ii  libc6        2.13-35
ii  lsb-base     4.1+Debian7

ifupdown recommends no packages.

Versions of packages ifupdown suggests:
ii  isc-dhcp-client [dhcp-client]  4.2.2.dfsg.1-5+deb70u2
ii  net-tools                      1.60-24.2
ii  ppp                            2.4.5-5.1+b1
pn  rdnssd                         <none>

-- Configuration Files:
/etc/init.d/networking changed:
PATH="/sbin:/bin:/usr/sbin"
RUN_DIR="/run/network"
IFSTATE="$RUN_DIR/ifstate"
[ -x /sbin/ifup ] || exit 0
[ -x /sbin/ifdown ] || exit 0
.. /lib/lsb/init-functions
CONFIGURE_INTERFACES=yes
EXCLUDE_INTERFACES=
VERBOSE=no
[ -f /etc/default/networking ] && . /etc/default/networking
[ "$VERBOSE" = yes ] && verbose=-v
process_exclusions() {
    set -- $EXCLUDE_INTERFACES
    exclusions=""
    for d
    do
        exclusions="-X $d $exclusions"
    done
    echo $exclusions
}
process_options() {
    [ -e /etc/network/options ] || return 0
    log_warning_msg "/etc/network/options still exists and it will be IGNORED! 
Please use /etc/sysctl.conf instead."
}
check_ifstate() {
    if [ ! -d "$RUN_DIR" ] ; then
        if ! mkdir -p "$RUN_DIR" ; then
            log_failure_msg "can't create $RUN_DIR"
            exit 1
        fi
    fi
    if [ ! -r "$IFSTATE" ] ; then
        if ! :> "$IFSTATE" ; then
            log_failure_msg "can't initialise $IFSTATE"
            exit 1
        fi
    fi
}
check_network_file_systems() {
    [ -e /proc/mounts ] || return 0
    if [ -e /etc/iscsi/iscsi.initramfs ]; then
        log_warning_msg "not deconfiguring network interfaces: iSCSI root is 
mounted."
        exit 0
    fi
    while read DEV MTPT FSTYPE REST; do
        case $DEV in
        /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
            log_warning_msg "not deconfiguring network interfaces: network 
devices still mounted."
            exit 0
            ;;
        esac
        case $FSTYPE in
        
nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
            log_warning_msg "not deconfiguring network interfaces: network file 
systems still mounted."
            exit 0
            ;;
        esac
    done < /proc/mounts
}
check_network_swap() {
    [ -e /proc/swaps ] || return 0
    while read DEV MTPT FSTYPE REST; do
        case $DEV in
        /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
            log_warning_msg "not deconfiguring network interfaces: network swap 
still mounted."
            exit 0
            ;;
        esac
    done < /proc/swaps
}
ifup_hotplug () {
    if [ -d /sys/class/net ]
    then
            ifaces=$(for iface in $(ifquery --list --allow=hotplug)
                            do
                                    link=${iface##:*}
                                    link=${link##.*}
                                    if [ -e "/sys/class/net/$link" ] && [ 
"$(cat /sys/class/net/$link/operstate)" = up ]
                                    then
                                            echo "$iface"
                                    fi
                            done)
            if [ -n "$ifaces" ]
            then
                ifup $ifaces "$@" || true
            fi
    fi
}
case "$1" in
start)
        process_options
        check_ifstate
        if [ "$CONFIGURE_INTERFACES" = no ]
        then
            log_action_msg "Not configuring network interfaces, see 
/etc/default/networking"
            exit 0
        fi
        set -f
        exclusions=$(process_exclusions)
        log_action_begin_msg "Configuring network interfaces"
        if ifup -a $exclusions $verbose && ifup_hotplug $exclusions $verbose
        then
            log_action_end_msg $?
        else
            log_action_end_msg $?
        fi
        ;;
stop)
        check_network_file_systems
        check_network_swap
        log_action_begin_msg "Deconfiguring network interfaces"
        if ifdown -a --exclude=lo $verbose; then
            log_action_end_msg $?
        else
            log_action_end_msg $?
        fi
        ;;
reload)
        process_options
        log_action_begin_msg "Reloading network interfaces configuration"
        state=$(cat /run/network/ifstate)
        ifdown -a --exclude=lo $verbose || true
        if ifup --exclude=lo $state $verbose ; then
            log_action_end_msg $?
        else
            log_action_end_msg $?
        fi
        ;;
force-reload|restart)
        process_options
        log_warning_msg "Running $0 $1 is deprecated because it may not 
re-enable some interfaces"
        log_action_begin_msg "Reconfiguring network interfaces"
        ifdown -a --exclude=lo $verbose || true
        set -f
        exclusions=$(process_exclusions)
        if ifup -a --exclude=lo $exclusions $verbose && ifup_hotplug 
$exclusions $verbose
        then
            log_action_end_msg $?
        else
            log_action_end_msg $?
        fi
        ;;
*)
        echo "Usage: /etc/init.d/networking 
{start|stop|reload|restart|force-reload}"
        exit 1
        ;;
esac
exit 0


-- no debconf information
*** etc/init.d/networking	2012-08-17 01:21:03.000000000 +0400
--- /etc/init.d/networking	2012-11-09 12:26:41.282097039 +0400
***************
*** 9,15 ****
  # Description:       Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
  ### END INIT INFO
  
! PATH="/sbin:/bin"
  RUN_DIR="/run/network"
  IFSTATE="$RUN_DIR/ifstate"
  
--- 9,15 ----
  # Description:       Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
  ### END INIT INFO
  
! PATH="/sbin:/bin:/usr/sbin"
  RUN_DIR="/run/network"
  IFSTATE="$RUN_DIR/ifstate"
  
*** etc/init.d/networking	2012-08-17 01:21:03.000000000 +0400
--- /etc/init.d/networking	2012-11-09 12:26:41.282097039 +0400
***************
*** 9,15 ****
  # Description:       Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
  ### END INIT INFO
  
! PATH="/sbin:/bin"
  RUN_DIR="/run/network"
  IFSTATE="$RUN_DIR/ifstate"
  
--- 9,15 ----
  # Description:       Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
  ### END INIT INFO
  
! PATH="/sbin:/bin:/usr/sbin"
  RUN_DIR="/run/network"
  IFSTATE="$RUN_DIR/ifstate"
  

Reply via email to