From 6b41b93bc5392ff632b68700d32f226f4dbc4c6f Mon Sep 17 00:00:00 2001 From: jow Date: Sun, 2 May 2010 16:47:16 +0000 Subject: [package] ppp: rename 20-usb-modem to 20-atm-modem git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21303 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/ppp/files/etc/hotplug.d/atm/20-atm-modem | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/ppp/files/etc/hotplug.d/atm/20-atm-modem (limited to 'package/ppp/files/etc/hotplug.d/atm/20-atm-modem') diff --git a/package/ppp/files/etc/hotplug.d/atm/20-atm-modem b/package/ppp/files/etc/hotplug.d/atm/20-atm-modem new file mode 100644 index 0000000000..ab9e3b7f8e --- /dev/null +++ b/package/ppp/files/etc/hotplug.d/atm/20-atm-modem @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ "$ACTION" = "add" ]; then + include /lib/network + scan_interfaces + + local found=0 + local ifc + for ifc in $interfaces; do + local up + config_get_bool up "$ifc" up 0 + + local proto + config_get proto "$ifc" proto + + if [ "$proto" = "pppoa" ] && [ "$up" != 1 ]; then + found=1 + ( sleep 1; ifup "$ifc" ) & + fi + done + + if [ "$found" != 1 ]; then + logger "Found no matching interface for DSL device $DEVICENAME" + fi +fi -- cgit v1.2.3