aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/linux-atm
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/utils/linux-atm')
-rw-r--r--package/network/utils/linux-atm/Makefile5
-rwxr-xr-xpackage/network/utils/linux-atm/files/br2684ctl2
-rw-r--r--package/network/utils/linux-atm/files/br2684ctl_wrap5
3 files changed, 10 insertions, 2 deletions
diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile
index 51e604c0bb..9c6cfec95c 100644
--- a/package/network/utils/linux-atm/Makefile
+++ b/package/network/utils/linux-atm/Makefile
@@ -182,7 +182,10 @@ define Package/br2684ctl/install
$(INSTALL_BIN) ./files/br2684ctl $(1)/etc/init.d/
$(INSTALL_DATA) ./files/atm.hotplug $(1)/etc/hotplug.d/atm/00-trigger
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(1)/usr/sbin/
+ $(INSTALL_BIN) \
+ ./files/br2684ctl_wrap \
+ $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl \
+ $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,linux-atm))
diff --git a/package/network/utils/linux-atm/files/br2684ctl b/package/network/utils/linux-atm/files/br2684ctl
index 3d122270e9..1cac4df04d 100755
--- a/package/network/utils/linux-atm/files/br2684ctl
+++ b/package/network/utils/linux-atm/files/br2684ctl
@@ -58,7 +58,7 @@ start_daemon() {
procd_open_instance
procd_set_param command \
- /usr/sbin/br2684ctl \
+ /usr/sbin/br2684ctl_wrap "nas$unit" \
-c "$unit" -e "$encaps" -p "$payload" \
-a "$circuit" ${qos:+-q "$qos"} ${sendsize:+-s "$sendsize"}
procd_close_instance
diff --git a/package/network/utils/linux-atm/files/br2684ctl_wrap b/package/network/utils/linux-atm/files/br2684ctl_wrap
new file mode 100644
index 0000000000..d1bc98e014
--- /dev/null
+++ b/package/network/utils/linux-atm/files/br2684ctl_wrap
@@ -0,0 +1,5 @@
+#!/bin/sh
+. /lib/functions/network.sh
+device="$1"; shift
+network_defer_device "$device"
+exec /usr/sbin/br2684ctl "$@"