local config="$1"
local iface="$2"
- for module in slhc ppp_generic pppox pppoe; do
- /sbin/insmod $module 2>&- >&-
- done
+ /sbin/modprobe -qa slhc ppp_generic pppox pppoe
json_get_var mtu mtu
mtu="${mtu:-1492}"
local config="$1"
local iface="$2"
- for module in slhc ppp_generic pppox pppoatm; do
- /sbin/insmod $module 2>&- >&-
- done
+ /sbin/modprobe -qa slhc ppp_generic pppox pppoatm
json_get_vars atmdev vci vpi encaps
exit 1
}
- local load
- for module in slhc ppp_generic ppp_async ppp_mppe ip_gre gre pptp; do
- grep -q "^$module " /proc/modules && continue
- /sbin/insmod $module 2>&- >&-
- load=1
- done
- [ "$load" = "1" ] && sleep 1
+ /sbin/modprobe -qa slhc ppp_generic ppp_async ppp_mppe ip_gre gre pptp
+ sleep 1
ppp_generic_setup "$config" \
plugin pptp.so \
[ -f /usr/lib/pppd/*/pppoatm.so ] && add_protocol pppoa
[ -f /usr/lib/pppd/*/pptp.so ] && add_protocol pptp
}
-