summaryrefslogtreecommitdiff
path: root/package/relayd/files/relay.hotplug
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-30 18:23:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-04-30 18:23:52 +0000
commit8a790d97308153c345abfd27e5693b688fc3ba89 (patch)
treec15df09c2a32cdf661a107b609238647459de864 /package/relayd/files/relay.hotplug
parentcbfce5383188be93ec84d0c485aba8a48a784258 (diff)
downloadmtk-20170518-8a790d97308153c345abfd27e5693b688fc3ba89.zip
mtk-20170518-8a790d97308153c345abfd27e5693b688fc3ba89.tar.gz
mtk-20170518-8a790d97308153c345abfd27e5693b688fc3ba89.tar.bz2
relayd: use an init script instead of a legacy network proto handler (fixes #11276)
SVN-Revision: 31542
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 b992fca..afffbfe 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