You are not logged in.

#1 2025-03-08 06:32:58

dksl
Member
Registered: 2025-03-08
Posts: 2

systemctl --wait never returns

Hi everyone, i'm trying to create a custom systemd target, and a service that starts it. The target file is simple:

[Unit]
Description=Monitor user session
After=multi-user.target
RequiredBy=weston.service

However when i try to start the target  with

systemctl --wait start monitor-session.target

, the call never returns. If i force exit (ctrl+c) and check the status of monitor-session.target i can see that it's started. I'm following instructions on this page to start weston at boot (near the and of the page) but there's a service with an ExecStart that need to wait for the target to be started and fails with timeout. I've tried systemctl --wait start with other targets like multi-user.target or graphical.target just to see the behaviour and it's the same... systemctl waits forever (well... i waited for about 1 minute, but it seems enough to me...). Any suggestion?

Offline

#2 2025-03-08 12:29:02

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,489
Website

Re: systemctl --wait never returns

However when i try to start the target  with

systemctl --wait start monitor-session.target

, the call never returns. If i force exit (ctrl+c) and check the status of monitor-session.target i can see that it's started

What do you think '--wait' does?

https://man.archlinux.org/man/core/syst … emctl.1.en

Mod note: moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2025-03-08 14:11:44

dksl
Member
Registered: 2025-03-08
Posts: 2

Re: systemctl --wait never returns

My bad for not reading the manual... Still not understanding why the service that starts the target goes in timeout. The message is

Failed to start monitor-session.target: Connection timed out

and the ExecStart line

systemctl --wait start monitor-session.target

. As far as i understand the service should stay alive while monitor-session.target is active... Am i wrong?

Offline

Board footer

Powered by FluxBB