summaryrefslogtreecommitdiff
path: root/extra/ifplugd/ifplugd.action
diff options
context:
space:
mode:
Diffstat (limited to 'extra/ifplugd/ifplugd.action')
-rw-r--r--extra/ifplugd/ifplugd.action29
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/ifplugd/ifplugd.action b/extra/ifplugd/ifplugd.action
new file mode 100644
index 000000000..23b74c60d
--- /dev/null
+++ b/extra/ifplugd/ifplugd.action
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# ifplugd.action script for Arch Linux
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+plugscript(){ #argumets are ifup|ifdown, interface_name
+ for script in /etc/ifplugd/$1.d/*.sh; do
+ [ -x $script ] && $script $2
+ done
+ return 0
+}
+
+case "$2" in
+ up)
+ /etc/rc.d/network ifup $1
+ plugscript ifup $1
+ ;;
+ down)
+ plugscript ifdown $1
+ /etc/rc.d/network ifdown $1
+ ;;
+ *)
+ echo "Wrong arguments" > /dev/stderr
+ ;;
+esac
+
+exit 1