From 7df9d8d01dadcb05396d278aba11afc2ab4a2328 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sun, 27 Oct 2024 12:08:17 +0900 Subject: system: move sd_booted implementation to os abstraction This implements lazy loading of the systemd marker (they are not accessed in init and shim) and ensures consistent behaviour when running with a stub. Signed-off-by: Ophestra Umiker --- internal/app/seal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/app/seal.go') diff --git a/internal/app/seal.go b/internal/app/seal.go index b433b82e..80c3ec29 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -108,7 +108,7 @@ func (a *app) Seal(config *Config) error { } case method[LaunchMethodMachineCtl]: seal.launchOption = LaunchMethodMachineCtl - if !internal.SdBootedV { + if !a.os.SdBooted() { return fmsg.WrapError(ErrSystemd, "system has not been booted with systemd as init system") } -- cgit v1.3.1