Hi all,
In ppp.sh script, we have line which sets the WAN ifname to ppp0. We are
using this script for also PPTP, PPPoE and L2TP modes. We are not running
PPP alone (like through a serial line). Our WAN ifname is set to eth1 in the
network configuration file. After this function is called, the ifname is set
to ppp0 (only in the RAM), we are also keeping the original config files in
the flash. Why do we need to set the ifname to ppp0? We are also using the
ifname in other places, such as checking the physical interface status, if
it is up or down.
Can someone explain the reason of this set here?
scan_ppp() {
config_get ifname "$1" ifname
pppdev="${pppdev:-0}"
config_get unit "$1" unit
[ -z "$unit" ] && {
unit="$pppdev"
if [ "${ifname%%[0-9]*}" = ppp ]; then
unit="${ifname##ppp}"
[ "$pppdev" -le "$unit" ] && pppdev="$(($unit + 1))"
else
pppdev="$(($pppdev + 1))"
fi
config_set "$1" ifname "ppp$unit"
config_set "$1" unit "$unit"
}
}
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users