aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorManas Sambhus <manas.sambhus+github@gmail.com>2022-07-09 11:56:09 +0530
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-27 17:16:42 +0200
commitdb0c0a31d88293ac7430335627844da7d80c85fd (patch)
tree43b7c18710c94dee7c2b9ffa07980c26f901b5d9 /package/network/services
parentc092b3ba63e0a60be2a5bc9aa716c26f4c6f3755 (diff)
downloadupstream-db0c0a31d88293ac7430335627844da7d80c85fd.tar.gz
upstream-db0c0a31d88293ac7430335627844da7d80c85fd.tar.bz2
upstream-db0c0a31d88293ac7430335627844da7d80c85fd.zip
ppp: use modprobe in place of insmod
This will prevent `module is already loaded` lines from appearing in the logs when a PPP connection is reconnecting Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/ppp/Makefile2
-rwxr-xr-xpackage/network/services/ppp/files/ppp.sh18
2 files changed, 5 insertions, 15 deletions
diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index 10e9bdfdfe..8476204e14 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ppp
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index 7bbc497c43..6d3a8e29ff 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -220,9 +220,7 @@ proto_pppoe_setup() {
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}"
@@ -262,9 +260,7 @@ proto_pppoa_setup() {
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
@@ -311,13 +307,8 @@ proto_pptp_setup() {
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 \
@@ -335,4 +326,3 @@ proto_pptp_teardown() {
[ -f /usr/lib/pppd/*/pppoatm.so ] && add_protocol pppoa
[ -f /usr/lib/pppd/*/pptp.so ] && add_protocol pptp
}
-