blob: 07895bcad6f90a2e7c381862df42cbf0a612c15f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
#
# ifplugd.action script for Arch Linux
#
. /etc/rc.conf
. /etc/rc.d/functions
plugscript() { # arguments 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" >&2
;;
esac
exit 1
|