Package: ifplugd
Version: 0.28-11
Severity: wishlist
Tags: patch
When running the action scripts in /etc/ifplugd/action.d/, please
consider executing them in reverse order for the down action.
This allows scripts to do things before ifup and after ifdown of the
ifplugd controlled interface. For example, I would like to deactivate
wpa-roam managed wireless when a cable is plugged into ethernet device
and re-activate wpa-roam managed wireless when cable is unplugged. This
can be done with a single script if reverse execution is done on down
action. Will send the script in a separate bug report, for conideration
as a default behaviour.
I would also like to humbly suggest that #474746 be reconsidered, and
state that the --exit-on-error option probably isn't the greatest idea,
as you suspected at the time I initially suggested it. Below patch
removes that option too.
Thanks, Kel.
---
--- a/debian/ifplugd.action
+++ b/debian/ifplugd.action
@@ -20,8 +20,11 @@
set -e
case "$2" in
-up|down)
- run-parts --exit-on-error --arg="$1" --arg="$2" /etc/ifplugd/action.d/
+up)
+ run-parts --arg="$1" --arg="$2" /etc/ifplugd/action.d/
+ ;;
+down)
+ run-parts --reverse --arg="$1" --arg="$2" /etc/ifplugd/action.d/
;;
*)
echo "ifplugd.action: Incorrect action argument" >&2
---
-- Package-specific info:
/proc/net/dev interfaces:
lo
eth0
wmaster0
wlan0
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-9.slh.1-sidux-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ifplugd depends on:
ii debconf [debconf-2.0] 1.5.22 Debian configuration management sy
ii libc6 2.7-12 GNU C Library: Shared libraries
ii libdaemon0 0.12-2 lightweight C library for daemons
Versions of packages ifplugd recommends:
ii ifupdown 0.6.8+nmu1 high level tools to configure netw
-- debconf information:
ifplugd/interfaces:
ifplugd/hotplug_interfaces:
ifplugd/args: -q -f -u0 -d10 -w -I
ifplugd/suspend_action: stop
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]