mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 21:43:05 +09:00
210 run_privileged() call sites passed no timeout. With output captured and no terminal attached, a command that never returns takes its caller with it — silently and forever. That is exactly how the metadata guard's iptables probe wedged backend startup; the sudo -n fix removed that one trigger, but the class of bug was still one hung command away. run_privileged now applies a default timeout when the caller does not name one, so the fix lands on all 210 sites at once rather than being reapplied by hand and forgotten on the 211th. TimeoutExpired is a far better outcome than a wedged worker, and callers that genuinely need longer already pass their own; `timeout=None` opts out deliberately. The four direct read-only probes in this module (dpkg -s, rpm -q, systemctl is-active/is-enabled) bypass that helper, so they get their own much tighter ceiling — they answer immediately or not at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>