linux-atm: add wrapper for br2684ctl to defer nasX device bringup
Fixes a race condition on netifd device bringup. Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47891
This commit is contained in:
parent
c0f4c9e0d8
commit
510f5a7209
3 changed files with 10 additions and 2 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
5
package/network/utils/linux-atm/files/br2684ctl_wrap
Normal file
5
package/network/utils/linux-atm/files/br2684ctl_wrap
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
. /lib/functions/network.sh
|
||||
device="$1"; shift
|
||||
network_defer_device "$device"
|
||||
exec /usr/sbin/br2684ctl "$@"
|
Loading…
Reference in a new issue