1 |
On 2018-04-10 10:55, Christoph Böhmwalder wrote: |
2 |
|
3 |
> I was wondering how the OpenRC dependencies between start scripts |
4 |
> work. |
5 |
|
6 |
openvpn start-up dependencies (and, I imagine, any user space based VPN) |
7 |
are definitely a pain point. One part is the subject of the main thread |
8 |
here ie. what other scripts openvpn itself should depend on. Is it |
9 |
really safe to start it before the hardware interfaces are up? I guess |
10 |
in its default config it will keep trying until it can connect to the |
11 |
server, but I think it can also be configured to just give up. |
12 |
|
13 |
Another part is the reverse dependencies. On my systems, any network |
14 |
service that provides the option is configured to only listen on the VPN |
15 |
interface (plus localhost if necessary). But that means the service |
16 |
depends on the interface being functional - and, as I have learned, in |
17 |
the case of openvpn and TUN interface that means not just being in the |
18 |
UP state, but also the routing table being updated which happens _after_ |
19 |
it is put into UP state. The work to ensure all this state is done by |
20 |
the openvpn daemon in the background, out of control of openrc or |
21 |
sysvinit, so it is definitely possible that the openvpn initscript |
22 |
finishes before the final working state is reached. Then I have network |
23 |
service daemons failing to start (even if they have an explicit |
24 |
dependency on openvpn) because they cannot listen() on the VPN |
25 |
interface. I have to work around this with nefarious hacks using netcat |
26 |
or ping to test the VPN. |
27 |
|
28 |
I assume systemd handles this correctly, and this is an occasion when I |
29 |
envy systemd users and consider, for a few seconds, joining them. |
30 |
|
31 |
-- |
32 |
Please don't Cc: me privately on mailing lists and Usenet, |
33 |
if you also post the followup to the list or newsgroup. |
34 |
To reply privately _only_ on Usenet and on broken lists |
35 |
which rewrite From, fetch the TXT record for no-use.mooo.com. |