System — privilege escalation and sudo keepalive¶
Source: src/library/system.sh
Run a command as root. If already root: exec directly. If not: delegate to sudo boxctl-su, which enforces the /etc/boxctl/su.conf allowlist.
Return codes
All functions return 0 on success, 1 on failure, 2 on wrong argument count.
priv::run¶
Running privileged command:
Arguments: at least 1 argument
system::sudo_keepalive¶
Starting sudo keepalive background process
Keep sudo credentials alive in the background. Call once at the start of a long-running privileged script.
machine-id persistence¶
machine_id::persist¶
Persisting machine-id to
Persist /etc/machine-id to /data so it survives overlay resets. No-ops if already persisted, not yet initialized, or source is missing.