mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
abfe2f1bc2
If the network/wan configuration contains "solos0" ... "solos3" then this list of strings will be applied to the FPGA when the hardware is hotplug added. The syntax should be "tag=value", as per the values enumerated in the solos-attr.c list. In the canned example, the modem is temporarily turned off, told to detect noise, told to disable annexes M and A (effectively putting it into pure ADSL mode), and re-activated. There's probably a more appropriate function name than "dialog" but that's what I came up with. Handle other ATM hardware (Eagle, etc) besides solos-pci. SVN-Revision: 25510
27 lines
483 B
Bash
27 lines
483 B
Bash
#!/bin/sh
|
|
|
|
dialog() {
|
|
local tag="$(echo "$1" | cut -d= -f1)"
|
|
local value="$(echo "$1" | cut -d= -f2-)"
|
|
local response
|
|
|
|
response="$(soloscli -s "$port" "$tag" "$value")"
|
|
[ $? -ne 0 ] && {
|
|
logger "soloscli($port): $tag '$value' returns $response"
|
|
}
|
|
}
|
|
|
|
if [ "$ACTION" = "add" ]; then
|
|
include /lib/network
|
|
scan_interfaces
|
|
|
|
case $DEVICENAME in
|
|
solos-pci[0-3])
|
|
port="${DEVICENAME#solos-pci}"
|
|
device="solos${port}"
|
|
|
|
config_list_foreach wan "$device" dialog
|
|
;;
|
|
esac
|
|
fi
|