Package: netbase
Version: 4.34
Severity: wishlist
Tags: patch

Hello,

Due to the thread starting at [1] I looked at /etc/init.d/networking and 
noticed that 'restart' and 'force-reload' are doing the same thing.  
Maybe it would make sense for 'force-reload' to actually use '--force' 
to ifup/ifdown? The attached patch does just that.

[1] http://lists.debian.org/debian-user/2009/06/msg00608.html

Regards,
Andrei

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=ro_RO.UTF-8, LC_CTYPE=ro_RO.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages netbase depends on:
ii  lsb-base                      3.2-22     Linux Standard Base 3.2 init scrip

Versions of packages netbase recommends:
ii  ifupdown                      0.6.8+nmu1 high level tools to configure netw

netbase suggests no packages.

-- no debconf information
--- debian/netbase.init.old     2008-07-26 02:02:15.000000000 +0300
+++ debian/netbase.init 2009-06-09 12:30:20.000000000 +0300
@@ -63,7 +63,7 @@
        fi
        ;;
 
-force-reload|restart)
+restart)
        process_options
 
        log_action_begin_msg "Reconfiguring network interfaces"
@@ -75,6 +75,18 @@
        fi
        ;;
 
+force-reload)
+       process_options
+
+       log_action_begin_msg "Reconfiguring network interfaces"
+       ifdown -a --force --exclude=lo || true
+       if ifup -a --force --exclude=lo; then
+           log_action_end_msg $?
+       else
+           log_action_end_msg $?
+       fi
+       ;;
+
 *)
        echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
        exit 1

Reply via email to