[openwrt/openwrt] ltq-adsl-app: add dsl_cpe_pipe.sh script

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 20 16:04:50 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0b1b671f422e7dac741f263f6618a04bbe3744f4

commit 0b1b671f422e7dac741f263f6618a04bbe3744f4
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Sat Oct 19 19:38:24 2024 +0200

    ltq-adsl-app: add dsl_cpe_pipe.sh script
    
    This allows to obtain detailed diagnostic information about the DSL
    connection from the modem. The script is copied from the corresponding
    packages for VDSL modems.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://patchwork.ozlabs.org/project/openwrt/patch/20241019174041.1281093-4-jan@3e8.eu/
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/config/ltq-adsl-app/Makefile           |  3 ++-
 .../network/config/ltq-adsl-app/files/dsl_cpe_pipe.sh  | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile
index 94e2e9d0d7..b96a3f71e5 100644
--- a/package/network/config/ltq-adsl-app/Makefile
+++ b/package/network/config/ltq-adsl-app/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=dsl_cpe_control_danube
 PKG_VERSION:=3.24.4.4
-PKG_RELEASE:=12
+PKG_RELEASE:=13
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
 PKG_SOURCE_URL:=@OPENWRT
@@ -77,6 +77,7 @@ define Package/ltq-adsl-app/install
 	$(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl
 	$(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin
+	$(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/
 endef
 
 $(eval $(call BuildPackage,ltq-adsl-app))
diff --git a/package/network/config/ltq-adsl-app/files/dsl_cpe_pipe.sh b/package/network/config/ltq-adsl-app/files/dsl_cpe_pipe.sh
new file mode 100755
index 0000000000..9002b7b316
--- /dev/null
+++ b/package/network/config/ltq-adsl-app/files/dsl_cpe_pipe.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+pipe_no=0
+
+# use specified pipe no
+case "$1" in
+0|1|2)
+pipe_no=$1; shift; ;;
+esac
+
+
+#echo "Call dsl_pipe with $*"
+lock /var/lock/dsl_pipe
+echo $* > /tmp/pipe/dsl_cpe${pipe_no}_cmd
+result=$(cat /tmp/pipe/dsl_cpe${pipe_no}_ack)
+lock -u /var/lock/dsl_pipe
+
+echo "$result"




More information about the lede-commits mailing list