Add boot unit applying a local config #34
Reference in New Issue
Block a user
Delete Branch "benvin/boot-unit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hosts managed from a local config (e.g.
-c /etc/shorewall) have no unit applying the ruleset at boot, so they come up unfiltered after a reboot; the RPM ships only the control-plane agent unit.tomswall.service: oneshottomswall applywithDefaultDependencies=no, beforenetwork-pre.target, wanted bysysinit.targetRestart=on-failure, 5s); fails open once retries are exhaustedTOMSWALL_CONFIGin/etc/tomswall/tomswall.env(commented shorewall example)tomswall.serviceandtomswall-agent.servicewith each otherDefaultDependencies=no; implicitAfter=sysinit.target basic.targetmakes the unit start after basic.target, so network-pre-ordered units (and anything early that is Before=basic.target) run unfiltered or can form an ordering cycle with Before=network-pre / WantedBy=basic.target → addDefaultDependencies=noplusConflicts=shutdown.targetandBefore=shutdown.target(keep the explicit After=local-fs.target systemd-sysctl.service).applyleaves the unit failed and boot continues with no ruleset, which contradicts the PR intent of not coming up unfiltered → decide and state it: addRestart=on-failure(oneshot supports it on 244+) or aExecStartPost/failure path that applies a default-drop ruleset; otherwise document that boot is fail-open.tomswall.yamlis not shipped (onlytomswall.example.yaml), so enabling the unit without editing the env file fails at boot → point the default at a shipped file or note it in tomswall.env.Restart=on-failure+RestartSec=5never exhausts: default StartLimit is 5 starts/10s, a 5s cadence gives at most 2-3 starts per window, so a bad config retries forever (every 5s, log spam) and the "fails open once restarts are exhausted" comment is false → addStartLimitIntervalSec=60/StartLimitBurst=5under [Unit] (or drop Restart= and accept one-shot fail-open), and reword the comment.No findings.