summaryrefslogtreecommitdiff
path: root/package/relayd/files/relay.hotplug
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-30 18:23:52 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-30 18:23:52 +0000
commit5bae60a02473c39fb49a4e9b7e2bd0b2f581e3ce (patch)
tree9bad8a1898ff1326344a3750b46de7dc324ef7fd /package/relayd/files/relay.hotplug
parente51f7c5d1b373e49b9c482b7b0227853a2975085 (diff)
relayd: use an init script instead of a legacy network proto handler (fixes #11276)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31542 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/relayd/files/relay.hotplug')
-rw-r--r--package/relayd/files/relay.hotplug36
1 files changed, 1 insertions, 35 deletions
diff --git a/package/relayd/files/relay.hotplug b/package/relayd/files/relay.hotplug
index b992fca08c..afffbfeab8 100644
--- a/package/relayd/files/relay.hotplug
+++ b/package/relayd/files/relay.hotplug
@@ -1,36 +1,2 @@
#!/bin/sh
-
-# Break recursion
-[ "$PROTO" = "relay" ] && exit 0
-
-include /lib/network
-scan_interfaces
-
-restart_relayd() {
- local cfg="$1"
-
- local proto
- config_get proto "$1" proto
- [ "$proto" = "relay" ] || return 0
-
- local net networks
- config_get networks "$cfg" network
- for net in $networks; do
- [ "$net" = "$INTERFACE" ] && {
- env -i /sbin/ifup "$cfg" &
- return 0
- }
- done
-
- local ifn ifnames
- config_get ifnames "$cfg" ifname
- for ifn in $ifnames; do
- [ "$ifn" = "$DEVICE" ] && {
- env -i /sbin/ifup "$cfg" &
- return 0
- }
- done
-}
-
-config_foreach restart_relayd interface
-
+/etc/init.d/relayd enabled && /etc/init.d/relayd start