aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/util/early.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-12 20:53:33 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-12 20:53:33 +0900
commitb0aff891661dfa2f438a7264607a4e6e9caef026 (patch)
tree323ccc8c09fee45c29e8e1e79b320a4fe6dc8d77 /internal/util/early.go
parent8223a9ee6637495c860aa3531f1db02e8c5bd819 (diff)
app: handle launch method in New function
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/util/early.go')
-rw-r--r--internal/util/early.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/util/early.go b/internal/util/early.go
new file mode 100644
index 00000000..ba7375c7
--- /dev/null
+++ b/internal/util/early.go
@@ -0,0 +1,12 @@
+package util
+
+import "fmt"
+
+var SdBootedV = func() bool {
+ if v, err := SdBooted(); err != nil {
+ fmt.Println("warn: read systemd marker:", err)
+ return false
+ } else {
+ return v
+ }
+}()