[PATCH] service: set 'Restart=always' to ensure failing services always restart

14 views
Skip to first unread message

Adrian DC

unread,
Feb 20, 2026, 3:31:27 PMFeb 20
to swup...@googlegroups.com, Stefano Babic, Adrian DC
Systemd default value is 'Restart=no', hence a failing SWUpdate service
might stay broken and never restart back to normal usage
---

Signed-off-by: Adrian DC <radi...@gmail.com>
---
recipes-support/swupdate/swupdate/swupdate-progress.service | 1 +
recipes-support/swupdate/swupdate/swupdate-usb@.service | 1 +
recipes-support/swupdate/swupdate/swupdate.service | 1 +
3 files changed, 3 insertions(+)

diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service b/recipes-support/swupdate/swupdate/swupdate-progress.service
index 0d464bb..cdbca07 100644
--- a/recipes-support/swupdate/swupdate/swupdate-progress.service
+++ b/recipes-support/swupdate/swupdate/swupdate-progress.service
@@ -4,6 +4,7 @@ After=swupdate.service

[Service]
ExecStart=/usr/bin/swupdate-progress -r -w
+Restart=always

[Install]
WantedBy=swupdate.service
diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service b/recipes-support/swupdate/swupdate/swupdate-usb@.service
index 28d805f..dde15a6 100644
--- a/recipes-support/swupdate/swupdate/swupdate-usb@.service
+++ b/recipes-support/swupdate/swupdate/swupdate-usb@.service
@@ -9,3 +9,4 @@ ExecStartPre=/bin/mount /dev/%I /tmp/%I
ExecStart=/bin/sh -c "swupdate-client -v /tmp/%I/*.swu"
ExecStopPost=/bin/umount /tmp/%I
ExecStopPost=/bin/rmdir /tmp/%I
+Restart=always
diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service
index 7f8e966..9edcd4e 100644
--- a/recipes-support/swupdate/swupdate/swupdate.service
+++ b/recipes-support/swupdate/swupdate/swupdate.service
@@ -6,6 +6,7 @@ Documentation=https://sbabic.github.io/swupdate
[Service]
Type=notify
ExecStart=@LIBDIR@/swupdate/swupdate.sh
+Restart=always
KillMode=mixed

[Install]
--
2.43.0

Stefano Babic

unread,
Mar 20, 2026, 9:57:04 AMMar 20
to Adrian DC, swup...@googlegroups.com, Stefano Babic
Hi Adrian,

On 2/20/26 21:31, Adrian DC wrote:
> Systemd default value is 'Restart=no', hence a failing SWUpdate service
> might stay broken and never restart back to normal usage
> ---
>
> Signed-off-by: Adrian DC <radi...@gmail.com>
> ---
> recipes-support/swupdate/swupdate/swupdate-progress.service | 1 +
> recipes-support/swupdate/swupdate/swupdate-usb@.service | 1 +
> recipes-support/swupdate/swupdate/swupdate.service | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service b/recipes-support/swupdate/swupdate/swupdate-progress.service
> index 0d464bb..cdbca07 100644
> --- a/recipes-support/swupdate/swupdate/swupdate-progress.service
> +++ b/recipes-support/swupdate/swupdate/swupdate-progress.service
> @@ -4,6 +4,7 @@ After=swupdate.service
>
> [Service]
> ExecStart=/usr/bin/swupdate-progress -r -w
> +Restart=always
>

I understand this, but it hides that the daemon stops. This daemon is
very simple. Have you activated psplash and if yes, do you have the fix
in 87a63f83d376 ?

Best regards,
Stefano Babic

> [Install]
> WantedBy=swupdate.service
> diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service b/recipes-support/swupdate/swupdate/swupdate-usb@.service
> index 28d805f..dde15a6 100644
> --- a/recipes-support/swupdate/swupdate/swupdate-usb@.service
> +++ b/recipes-support/swupdate/swupdate/swupdate-usb@.service
> @@ -9,3 +9,4 @@ ExecStartPre=/bin/mount /dev/%I /tmp/%I
> ExecStart=/bin/sh -c "swupdate-client -v /tmp/%I/*.swu"
> ExecStopPost=/bin/umount /tmp/%I
> ExecStopPost=/bin/rmdir /tmp/%I
> +Restart=always
> diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service
> index 7f8e966..9edcd4e 100644
> --- a/recipes-support/swupdate/swupdate/swupdate.service
> +++ b/recipes-support/swupdate/swupdate/swupdate.service
> @@ -6,6 +6,7 @@ Documentation=https://sbabic.github.io/swupdate
> [Service]
> Type=notify
> ExecStart=@LIBDIR@/swupdate/swupdate.sh
> +Restart=always
> KillMode=mixed
>
> [Install]

--
_______________________________________________________________________
Nabla Software Engineering GmbH
Hirschstr. 111A | 86156 Augsburg | Tel: +49 821 45592596
Geschäftsführer : Stefano Babic | HRB 40522 Augsburg
E-Mail: sba...@nabladev.com

Reply all
Reply to author
Forward
0 new messages