Thank you for working on this patch!

Me and rustybird agreed on the following. Please consider using the
following as netfilter-persistent.service.

#####

[Unit]
Description=netfilter persistent configuration
DefaultDependencies=no

Wants=network-pre.target
Before=network-pre.target

Wants=systemd-modules-load.service local-fs.target
After=systemd-modules-load.service local-fs.target

Conflicts=shutdown.target
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/netfilter-persistent start
ExecStop=/usr/sbin/netfilter-persistent stop

[Install]
WantedBy=multi-user.target

#####

When using DefaultDependencies=no and Conflicts=shutdown.target, one
should also use Before=shutdown.target. [1]

When using Wants=network-pre.target, one should also use
Before=network-pre.target. [2]

Cheers,
Patrick

[1]
https://www.freedesktop.org/software/systemd/man/systemd.special.html#shutdown.target
[2] https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

Reply via email to