Documentation
¶
Overview ¶
Package nftinstall puts the nftables package on a server that lacks it (a cloud image of Debian 13 has no nft command, and the agent's firewall steps need it). The doctor's fix install_nftables starts it as a transient root unit, outside the agent's service sandbox, the way the security updates job runs; the status file carries the result back.
Index ¶
Constants ¶
const ( UnitName = "mistgate-install-nftables" StatusFileName = "install-nftables.json" // JobTimeout bounds the task's waits; an apt-get that has started is never cut by it (awgprep.AptInstall), only the // unit's RuntimeMaxSec (30 minutes) stops a hung one. JobTimeout = 20 * time.Minute // LockWait bounds the wait for a package manager already using dpkg (a fresh image runs cloud-init and // unattended-upgrades in its first minutes). LockWait = 10 * time.Minute )
const Package = "nftables"
Package is what the job installs.
Variables ¶
This section is empty.
Functions ¶
func InstallArgs ¶
func InstallArgs() []string
InstallArgs is the apt-get argument list: no questions, no recommended packages, the dpkg lock waited for.
Types ¶
type Job ¶
type Job struct {
StatusPath string
Timeout time.Duration
LockWait time.Duration
Out io.Writer
Run awgprep.Runner
Sys awgprep.Sys
Now func() time.Time
// Installed says whether nft is there (nil = nftmissing.Installed); HasApt whether apt-get is (nil = on PATH).
Installed func() bool
HasApt func() bool
}
Job installs nftables without upgrading anything else and without touching a running service.