aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-04-21 09:37:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-04-21 09:37:13 +0000
commit7c08cc06a2bcebc54b0bd01ee83dc8a4e9fedfdc (patch)
tree8a87ea38d12a5e04540bc02dc07dfcb53c08831a /package
parentedb8f76fbc2dab051fac45c6d76b0f8f6b76ad22 (diff)
downloadupstream-7c08cc06a2bcebc54b0bd01ee83dc8a4e9fedfdc.tar.gz
upstream-7c08cc06a2bcebc54b0bd01ee83dc8a4e9fedfdc.tar.bz2
upstream-7c08cc06a2bcebc54b0bd01ee83dc8a4e9fedfdc.zip
add better default config for ar7, add br2684ctl init script, add a missing setting for pppoa
SVN-Revision: 7024
Diffstat (limited to 'package')
-rw-r--r--package/br2684ctl/Makefile2
-rwxr-xr-xpackage/br2684ctl/files/br2684ctl26
-rw-r--r--package/ppp/files/pppoa.sh8
3 files changed, 35 insertions, 1 deletions
diff --git a/package/br2684ctl/Makefile b/package/br2684ctl/Makefile
index 7c75c9499e..223f6f7c5f 100644
--- a/package/br2684ctl/Makefile
+++ b/package/br2684ctl/Makefile
@@ -31,6 +31,8 @@ endef
MAKE_FLAGS += CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)"
define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/br2684ctl $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
endef
diff --git a/package/br2684ctl/files/br2684ctl b/package/br2684ctl/files/br2684ctl
new file mode 100755
index 0000000000..b3ea34efcd
--- /dev/null
+++ b/package/br2684ctl/files/br2684ctl
@@ -0,0 +1,26 @@
+#!/bin/sh /etc/rc.common
+stop() {
+ killall br2684ctl 2>/dev/null >/dev/null
+ sleep 1
+ rmmod br2684
+}
+
+start_daemon() {
+ local cfg="$1"
+ config_get atmdev "$cfg" atmdev
+ config_get unit "$cfg" unit
+ config_get vpi "$cfg" vpi
+ config_get vci "$cfg" vci
+ config_get encaps "$cfg" encaps
+ case "$encaps" in
+ 1|vc) encaps=1;;
+ *) encaps=0;;
+ esac
+ br2684ctl -b -c "$unit" -e "$encaps" -a "${atmdev:+$atmdev.}${vpi:-8}.${vci:-35}"
+}
+
+start() {
+ insmod br2684 >/dev/null 2>/dev/null
+ config_load network
+ config_foreach start_daemon atm-bridge
+}
diff --git a/package/ppp/files/pppoa.sh b/package/ppp/files/pppoa.sh
index 9b8a919ac5..8c66250da5 100644
--- a/package/ppp/files/pppoa.sh
+++ b/package/ppp/files/pppoa.sh
@@ -13,10 +13,16 @@ setup_interface_pppoa() {
for module in slhc ppp_generic pppoatm; do
/sbin/insmod $module 2>&- >&-
done
+
+ config_get encaps "$config" encaps
+ case "$encaps" in
+ 1|vc) ENCAPS="vc-encaps" ;;
+ *) ENCAPS="llc-encaps" ;;
+ esac
config_get mtu "$cfg" mtu
mtu=${mtu:-1500}
start_pppd "$config" \
- plugin pppoatm.so ${vpi:-8}.${vci:-35} \
+ plugin pppoatm.so ${vpi:-8}.${vci:-35} ${ENCAPS} \
mtu $mtu mru $mtu
}