diff mbox series

package/psplash: fix systemd unit ordering and dependencies

Message ID 20240116110002.2146885-1-nolange79@gmail.com
State Accepted
Headers show
Series package/psplash: fix systemd unit ordering and dependencies | expand

Commit Message

Norbert Lange Jan. 16, 2024, 11 a.m. UTC
Fix a typo in the dependencies, and switch the type to 'exec'.
This ensures that the psplash-systemd service will find the
FIFO created by psplash.

Change the psplash-systemd dependency to BindsTo, so stopping
psplash itself will also end this service and free resources.

psplash-start service need to start early, otherwise it might try
to compete/take away the framebuffer from the final graphical
stack. Order it before sysinit.target.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
 package/psplash/psplash-start.service   | 2 ++
 package/psplash/psplash-systemd.service | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Arnout Vandecappelle April 3, 2024, 9:02 p.m. UTC | #1
On 16/01/2024 12:00, Norbert Lange wrote:
> Fix a typo in the dependencies, and switch the type to 'exec'.
> This ensures that the psplash-systemd service will find the
> FIFO created by psplash.

  It doesn't actually ensure that: systemd considers the unit ready as soon as 
it has done execve, but the pipe will only be created later.

  The solution is to make the psplash-systemd service wait until the pipe 
actually exists, but I'm not sure how to do that.

  Anyway, this is already an improvement, so applied to master, thanks.

  Regards,
  Arnout

> 
> Change the psplash-systemd dependency to BindsTo, so stopping
> psplash itself will also end this service and free resources.
> 
> psplash-start service need to start early, otherwise it might try
> to compete/take away the framebuffer from the final graphical
> stack. Order it before sysinit.target.
> 
> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
>   package/psplash/psplash-start.service   | 2 ++
>   package/psplash/psplash-systemd.service | 4 ++--
>   2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/psplash/psplash-start.service b/package/psplash/psplash-start.service
> index b97e883e54..74cbc33955 100644
> --- a/package/psplash/psplash-start.service
> +++ b/package/psplash/psplash-start.service
> @@ -2,8 +2,10 @@
>   Description=Starts Psplash Boot screen
>   DefaultDependencies=no
>   RequiresMountsFor=/run
> +Before=sysinit.target
>   
>   [Service]
> +Type=exec
>   ExecStart=/usr/bin/psplash -n
>   
>   [Install]
> diff --git a/package/psplash/psplash-systemd.service b/package/psplash/psplash-systemd.service
> index 249aa54039..f89bc5f4fe 100644
> --- a/package/psplash/psplash-systemd.service
> +++ b/package/psplash/psplash-systemd.service
> @@ -1,8 +1,8 @@
>   [Unit]
>   Description=Start psplash-systemd progress communication helper
>   DefaultDependencies=no
> -After=systemd-start.service
> -Requires=psplash-start.service
> +After=psplash-start.service
> +BindsTo=psplash-start.service
>   RequiresMountsFor=/run
>   
>   [Service]
diff mbox series

Patch

diff --git a/package/psplash/psplash-start.service b/package/psplash/psplash-start.service
index b97e883e54..74cbc33955 100644
--- a/package/psplash/psplash-start.service
+++ b/package/psplash/psplash-start.service
@@ -2,8 +2,10 @@ 
 Description=Starts Psplash Boot screen
 DefaultDependencies=no
 RequiresMountsFor=/run
+Before=sysinit.target
 
 [Service]
+Type=exec
 ExecStart=/usr/bin/psplash -n
 
 [Install]
diff --git a/package/psplash/psplash-systemd.service b/package/psplash/psplash-systemd.service
index 249aa54039..f89bc5f4fe 100644
--- a/package/psplash/psplash-systemd.service
+++ b/package/psplash/psplash-systemd.service
@@ -1,8 +1,8 @@ 
 [Unit]
 Description=Start psplash-systemd progress communication helper
 DefaultDependencies=no
-After=systemd-start.service
-Requires=psplash-start.service
+After=psplash-start.service
+BindsTo=psplash-start.service
 RequiresMountsFor=/run
 
 [Service]