Commit Graph

12 Commits

Author SHA1 Message Date
Tore Anderson cc64d0c6f3
Remove upstart support
Upstart has been discontinued for more than a decade, and no modern
distributions are using it anymore, so get rid of it.
2025-02-09 10:53:15 +01:00
Tore Anderson 6342488889
clatd@.systemd: sync with clatd.systemd
The following commits changed only clatd.systemd, but it makes sense to
applt them to clatd@.systemd as well.

eb27dd5 clatd.systemd: pull inn network-online.target
00fa0f3 SystemD service: ensure service starts after DNS queries (e.g. ipv4only.arpa) can be resolved.
2025-02-09 10:45:04 +01:00
Tore Anderson eb27dd5ead clatd.systemd: pull inn network-online.target
According to systemd.special(7):

> Units that strictly require a configured network connection should
> pull in network-online.target (via a Wants= type dependency) and
> order themselves after it.

The Wants= dependency was missing, add it.
2025-02-09 10:11:33 +01:00
Jivan Pal 00fa0f3266 SystemD service: ensure service starts after DNS queries (e.g. ipv4only.arpa) can be resolved. 2025-02-09 10:04:56 +01:00
satan1st a93f5ff491
add ifupdown integration (#31)
* add ifupdown integration

* fixup! add ifupdown integration

---------

Co-authored-by: satanist <satanist+fsmi@bureaucracy.de>
2023-08-08 08:34:50 +02:00
satan1st b8a7092873
add instantiated systemd unit (#29)
* add instantiated systemd unit

* fixup! add instantiated systemd unit

---------

Co-authored-by: satanist <satanist+fsmi@bureaucracy.de>
2023-08-08 08:33:50 +02:00
Tore Anderson a416278570 Make NM/systemd integration more robust
This fixed the following dependency loop that could occur when the
system was booting up:

1. NetworkManager configures a network interface and fires off the clatd
   dispatcher script.
2. The dispatcher scripts tries to restart `clatd.service`.
3. However, `clatd.service` cannot be (re)started at this point because
   its dependency `network-online.target` has not yet been reached.
4. Therefore, the `systemctl restart clatd.service` command in the
   dispatcher script blocks, waiting for `network-online.target` to be
   reached.
5. But that won't happen until the dispatcher scripts finishes...

Adding `--no-block` allows the dispatcher script to finish immediately
without waiting for the restart to complete (instead, systemd will do it
in the background once `network-online.target` has been reached).

Furthermore, since `clatd.service` may end up being restarted several
times during a boot process (especially on a system with many network
interfaces handled by NetworkManager), it is also at risk of
inadvertently triggering the restart rate-limiting feature in systemd,
so disable that while we're at it.

Closes #22. Thanks to @patrakov for the report!
2023-03-05 10:58:29 +01:00
Tore Anderson 6c7c2d2a92 Don't hardcode commands paths
Don't assume that utilities such as systemctl or initctl is found in a certain
specific path. Instead look for them in $PATH. This applies to both the
Makefile and the NetworkManager dispatcher script.

Resolves #11.
2017-08-15 17:46:54 +02:00
Tore Anderson fb4587bfd6 nm-dispatcher: only act on iface up/down events
Ensure other events (like hostname changes, DHCP lease renewals, etc.)
are ignored as they are very unlikely to be relevant for clatd.
2016-03-28 08:26:20 +02:00
Tore Anderson c48ad644c0 Avoid a restart loop with NM dispatcher scripts
Newer NetworkManager versions will run the dispatcher scripts when new
unknown interfaces show up, including 'clat'. That will cause a clatd
restart right after startup, and we'll never get to fully initialise. So
ensure the dispatcher script does nothing if the device in question is
our own 'clat' to prevent this.
2014-10-05 20:27:07 +02:00
Tore Anderson 058061525e Fix a misspelling 2014-06-29 13:40:44 +02:00
Tore Anderson 0b520f5442 Initial commit (clatd v1.0) 2014-03-11 00:59:34 +01:00