apparently net-dialup/ppp-2.5.0-r2 writes a pid file under a filename different from what the init script is expecting. ppp0 actually starts, but openrc thinks that it didn't and does not start any services that depend on connectivity. Reproducible: Always Steps to Reproduce: 1. emerge =net-dialup/ppp-2.5.0-r2 2. rc-service start net.ppp0 3. Actual Results: May 28 14:22:05 alerik pppd[16521]: Plugin pppoe.so loaded. May 28 14:22:05 alerik pppd[16521]: PPPoE plugin from pppd 2.5.0 May 28 14:22:05 alerik pppd[16521]: Plugin passwordfd.so loaded. May 28 14:22:05 alerik pppd[16521]: pppd 2.5.0 started by root, uid 0 May 28 14:22:05 alerik pppd[16521]: Access-Concentrator: ********* May 28 14:22:05 alerik pppd[16521]: Cookie: ********* May 28 14:22:05 alerik pppd[16521]: AC-Ethernet-Address: ********** May 28 14:22:05 alerik pppd[16521]: -------------------------------------------------- May 28 14:22:10 alerik pppd[16521]: PPP session is 4701 May 28 14:22:10 alerik pppd[16521]: Connected to ************ via interface eno1 May 28 14:22:10 alerik pppd[16521]: Using interface ppp0 May 28 14:22:10 alerik pppd[16521]: Connect: ppp0 <--> eno1 May 28 14:22:14 alerik pppd[16521]: PAP authentication succeeded May 28 14:22:14 alerik pppd[16521]: peer from calling number ******* authorized May 28 14:22:14 alerik pppd[16521]: local IP address **.**.**.** May 28 14:22:14 alerik pppd[16521]: remote IP address ***.***.***.*** May 28 14:22:14 alerik pppd[16521]: primary DNS address ***.***.***.*** May 28 14:22:14 alerik pppd[16521]: secondary DNS address ***.***.***.** May 28 14:22:14 alerik pppd[16530]: IPv6 socket creation failed: Address family not supported by protocol May 28 14:22:14 alerik last message buffered 1 times May 28 14:22:14 alerik /etc/init.d/net.ppp0[16520]: start-stop-daemon: did not create a valid pid in `/run/ppp-ppp0.pid' May 28 14:22:14 alerik /etc/init.d/net.ppp0[16364]: ERROR: net.ppp0 failed to start Expected Results: run without errors /etc/conf.d/net: ------------------------------------------------------------------------------ config_eno1="192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255" config_ppp0="ppp" link_ppp0="eno1" plugins_ppp0="pppoe" username_ppp0="********@*******" password_ppp0="**********" pppd_ppp0="defaultroute lcp-echo-interval 3 lcp-echo-failure 3 pppoe-verbose 255 persist updetach usepeerdns" rc_net_ppp0_need="firewall !net.usb0" rc_net_ppp0_provide="internet" ------------------------------------------------------------------------------
net-dialup/ppp does not supply an init script. /etc/init.d/net.ppp0 is probably a symlink to an init script provided by netifrc.
(In reply to Mike Gilbert from comment #1) > net-dialup/ppp does not supply an init script. > > /etc/init.d/net.ppp0 is probably a symlink to an init script provided by > netifrc. you're right. $ ls -l /etc/init.d/net.ppp0 lrwxrwxrwx 1 root root 6 Nov 22 2021 /etc/init.d/net.ppp0 -> net.lo $ equery b /etc/init.d/net.lo * Searching for /etc/init.d/net.lo ... net-misc/netifrc-0.7.4 (/etc/init.d/net.lo)
If able, please give this patch a try. https://github.com/gentoo/netifrc/pull/45
(In reply to Mike Gilbert from comment #3) > If able, please give this patch a try. > > https://github.com/gentoo/netifrc/pull/45 same result. i've checked what ppp-2.5 actually creates in /run: # ll /run/ppp* -rw-r--r-- 1 root root 8.0K May 28 14:31 /run/pppd2.tdb -rw-r--r-- 1 root root 11 May 28 16:28 /run/pppdppp-ppp0.pid -rw-r--r-- 1 root root 6 May 28 16:28 /run/pppdppp0.pid /run/pppd: total 0 drwxr-xr-x 2 root root 60 May 28 14:11 . drwxr-xr-x 23 root root 1.1K May 28 16:28 .. lrwxrwxrwx 1 root root 7 May 28 14:11 lock -> ../lock
Ugh, it seems there's a bug that fails to insert a "/" between "/run/pppd" and the pid filename.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdeaefbbdb36dfdf8bd040fb3f11fd99bea5136e commit fdeaefbbdb36dfdf8bd040fb3f11fd99bea5136e Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-05-28 21:16:18 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-05-28 21:25:54 +0000 net-dialup/ppp: fix pidfile path Bug: https://bugs.gentoo.org/907311 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-dialup/ppp/files/ppp-2.5.0-pidfile.patch | 37 +++++++++ net-dialup/ppp/ppp-2.5.0-r3.ebuild | 115 +++++++++++++++++++++++++++ 2 files changed, 152 insertions(+)
Please test ppp-2.5.0-r3 with this netifrc PR applied. https://github.com/gentoo/netifrc/pull/46
(In reply to Mike Gilbert from comment #7) > Please test ppp-2.5.0-r3 with this netifrc PR applied. > > https://github.com/gentoo/netifrc/pull/46 will do, as soon as it propagates down the mirrors. another thought: shouldn't then net-dialup/ppp depend on the proper version of net-misc/netifrc?
(In reply to Nick Soveiko from comment #8) > another thought: shouldn't then net-dialup/ppp depend on the proper version > of net-misc/netifrc? net-dialup/ppp does not require net-misc/netifrc, so we cannot add such a dependency.
(In reply to Mike Gilbert from comment #9) > net-dialup/ppp does not require net-misc/netifrc, so we cannot add such a > dependency. how come it doesn't require if net-misc/netifrc supplies the init script for it?
pppd can be started directly, or via a program like NetworkManager. Neither of these uses care about the init script.
sounds to me like a perfect case for a USE flag, no?
Nope.
Such a USE flag is banned by Gentoo policy. https://projects.gentoo.org/qa/policy-guide/dependencies.html#pg0001
I was able to test this locally in an OpenRC container, and it seems to work with both ppp-2.4.9-r9 and ppp-2.5.0-r3.
i'm pleased to confirm that net-dialup/ppp-2.5.0-r3 together with /lib/netifrc/net/ppp.sh patched as in https://raw.githubusercontent.com/gentoo/netifrc/2663baa79654c0059eccb27847eabe877eb0330e/net/pppd.sh work and produce no errors. thank you!
Thanks for testing!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=0ac293faa15b49f08830120e7b5fa1e4523f19e5 commit 0ac293faa15b49f08830120e7b5fa1e4523f19e5 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-05-28 20:07:47 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-05-28 22:49:02 +0000 Update pidfile path for ppp-2.5.0 Bug: https://bugs.gentoo.org/907311 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net/pppd.sh | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-)