mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
bootstrapper: use systemd dbus connection
This commit is contained in:
parent
6f56ed69f8
commit
f92a07821e
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func startSystemdUnit(ctx context.Context, unit string) error {
|
func startSystemdUnit(ctx context.Context, unit string) error {
|
||||||
conn, err := dbus.NewSystemdConnectionContext(ctx)
|
conn, err := dbus.NewSystemConnectionContext(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("establishing systemd connection: %w", err)
|
return fmt.Errorf("establishing systemd connection: %w", err)
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ func startSystemdUnit(ctx context.Context, unit string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func enableSystemdUnit(ctx context.Context, unitPath string) error {
|
func enableSystemdUnit(ctx context.Context, unitPath string) error {
|
||||||
conn, err := dbus.NewSystemdConnectionContext(ctx)
|
conn, err := dbus.NewSystemConnectionContext(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("establishing systemd connection: %w", err)
|
return fmt.Errorf("establishing systemd connection: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user