diff --git a/cmd/sysotad/service.go b/cmd/sysotad/service.go index 2c6852997021b53aab592135544619b002f7e438..7fddb1f526cac6f2edcfb6285a92b01d4fe9580c 100644 --- a/cmd/sysotad/service.go +++ b/cmd/sysotad/service.go @@ -5,6 +5,7 @@ package sysotad import ( "fmt" + "time" "github.com/godbus/dbus/v5" "gitlab.com/zygoon/go-raspi/pimodel" @@ -143,6 +144,11 @@ func NewService(conn *dbus.Conn, opts ...Option) (*Service, error) { return nil, err } + // Ask the boot protocol to delay the reboot process if this is supported. + if delayer, ok := bootProto.(boot.RebootDelayer); ok { + delayer.SetRebootDelay(time.Duration(svc.confGuard.Config().QuirkRebootDelay) * time.Second) + } + // Configure and add the boot service if the corresponding // debug flag is enabled. if svc.confGuard.Config().DebugBootAPI {