25 lines
454 B
Bash
Executable File
25 lines
454 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# /etc/bewan/lib/libdsl
|
|
|
|
# Common function used by scripts
|
|
# setparam must be included
|
|
|
|
[ ${LIBDSL_LIB:-0} = 1 ] && return
|
|
|
|
LIBDSL_LIB=1
|
|
|
|
retrieve_xdsl_mode() {
|
|
local adsl vdsl
|
|
xdsl_mode=''
|
|
adsl=`adslinfo | grep "modulation" | grep "G.992" | wc -l`
|
|
if [ "$adsl" -eq 1 ]; then
|
|
xdsl_mode="adsl"
|
|
else
|
|
vdsl=`adslinfo | grep "modulation" | grep "G.993" | wc -l`
|
|
if [ "$vdsl" -eq 1 ]; then
|
|
xdsl_mode="vdsl"
|
|
fi
|
|
fi
|
|
}
|