Bug 250908 - /etc/rc.d/ppp profile support incomplete
Summary: /etc/rc.d/ppp profile support incomplete
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-rc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-06 18:17 UTC by Thomas Steen Rasmussen / Tykling
Modified: 2021-04-14 05:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steen Rasmussen / Tykling 2020-11-06 18:17:38 UTC
Hello,

I've been trying to use the multi profile support in /etc/rc.d/ppp but it doesn't work very well. It can start and stop multiple ppp profiles all at the same time, so that part works.

What doesn't work is:

1) (re)starting a ppp profile if another one is already running.
2) Restarting all ppp profiles only works sometimes because of a missing pwait and sometimes ppp takes a few seconds to hangup and exit.


I have the following in rc.conf:

[tykling@container1 ~]$ grep ppp /etc/rc.conf
ppp_enable="YES"
ppp_profile="telmore_quectel telmore_huawei"
ppp_telmore_quectel_mode="ddial"
ppp_telmore_quectel_unit="0"
ppp_telmore_huawei_mode="ddial"
ppp_telmore_huawei_unit="1"
[tykling@container1 ~]$ 

After boot both profiles are running well:

[tykling@container1 ~]$ sudo service ppp status
ppp is running as pid 83309 92053.

I can stop a profile:

[tykling@container1 ~]$ sudo service ppp stop telmore_huawei
Stopping PPP profile: telmore_huawei.
[tykling@container1 ~]$ sudo service ppp status
ppp is running as pid 83309.

But not start it again:

[tykling@container1 ~]$ sudo service ppp start telmore_huawei                                                                                                                                                                                                                                                                                          
ppp already running?  (pid=83309).

If I stop the other one:

[tykling@container1 ~]$ sudo service ppp stop telmore_quectel                                                                                                                                                                                                                                                                                          
Stopping PPP profile: telmore_quectel.
[tykling@container1 ~]$ sudo service ppp status
ppp is not running.

I can start one of them again:

[tykling@container1 ~]$ sudo service ppp start telmore_quectel
Starting PPP profile: telmore_quectel
.

But not the other one:

[tykling@container1 ~]$ sudo service ppp start telmore_huawei 
ppp already running?  (pid=69181).
[tykling@container1 ~]$ sudo service ppp status
ppp is running as pid 69181.
[tykling@container1 ~]$ 

I think the profile support needs some love.
Comment 1 Thomas Steen Rasmussen / Tykling 2020-11-06 18:20:31 UTC
An example of restart not working:

[tykling@container1 ~]$ sudo service ppp restart
Stopping PPP profile: telmore_quectel telmore_huawei.
ppp already running?  (pid=23948).
[tykling@container1 ~]$ sudo service ppp status 
ppp is not running.
[tykling@container1 ~]$ # now I'm offline :(

Let me know if I should test anything, I have a week or two before this system goes into production, and it will be more difficult for me to test stuff.

Thanks! :)
Comment 2 Akos Somfai 2020-11-08 08:40:16 UTC
A quick-and-dirty workaround could be to use service faststart/fastrestart instead of start/restart for these scenarios.