mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-19 19:54:22 -04:00
bootstrapper: use systemd dbus connection
This commit is contained in:
parent
6f56ed69f8
commit
f92a07821e
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue