diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-02 16:47:16 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-02 16:47:16 +0000 |
commit | 3b5689eb5ea065b17dbf16ecaec078a1261060e1 (patch) | |
tree | 836460630f5c4504079a49845378ba5c2d2f290f /package/ppp/files/etc/hotplug.d/atm/20-atm-modem | |
parent | b46d822e9bbb9e8c0c3e134d2eee09dfcf8b2cef (diff) | |
download | mtk-20170518-3b5689eb5ea065b17dbf16ecaec078a1261060e1.zip mtk-20170518-3b5689eb5ea065b17dbf16ecaec078a1261060e1.tar.gz mtk-20170518-3b5689eb5ea065b17dbf16ecaec078a1261060e1.tar.bz2 |
ppp: rename 20-usb-modem to 20-atm-modem
SVN-Revision: 21303
Diffstat (limited to 'package/ppp/files/etc/hotplug.d/atm/20-atm-modem')
-rw-r--r-- | package/ppp/files/etc/hotplug.d/atm/20-atm-modem | 25 |
1 files changed, 25 insertions, 0 deletions
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 0000000..45ef542 --- /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 |