Root/package/ppp/files/etc/hotplug.d/atm/20-atm-modem

1#!/bin/sh
2
3if [ "$ACTION" = "add" ]; then
4    include /lib/network
5    scan_interfaces
6
7    local found=0
8    local ifc
9    for ifc in $interfaces; do
10        local up
11        config_get_bool up "$ifc" up 0
12
13        local proto
14        config_get proto "$ifc" proto
15
16        if [ "$proto" = "pppoa" ] && [ "$up" != 1 ]; then
17            found=1
18            ( sleep 1; ifup "$ifc" ) &
19        fi
20    done
21
22    if [ "$found" != 1 ]; then
23        logger "Found no matching interface for DSL device $DEVICENAME"
24    fi
25fi
26

Archive Download this file



interactive