fix(agent): fix pacman update check under systemd sandbox

- store checkupdates' private DB in the agent data dir, since
  ProtectSystem=strict makes /tmp read-only
- sync the private DB every 12h and use `checkupdates -n` in between,
  forcing a sync when the DB is missing so -n never reports a false 0
- set WaitDelay so a timed-out command can't hang on child processes
This commit is contained in:
henrygd
2026-09-25 11:22:38 -04:00
parent c25408651f
commit f50fb4f8e5
3 changed files with 102 additions and 14 deletions

View File

@@ -156,7 +156,7 @@ func NewAgent(dataDir ...string) (agent *Agent, err error) {
slog.Debug("SMART", "err", err)
}
agent.packageUpdates = newPackageUpdatesManager()
agent.packageUpdates = newPackageUpdatesManager(agent.dataDir)
// initialize GPU manager
agent.gpuManager, err = NewGPUManager()