Artix Linux Forum

Init systems => S6 => Topic started by: constatinus on 22 January 2021, 12:39:19

Title: Delay to starting services?
Post by: constatinus on 22 January 2021, 12:39:19
The s6-supervise s6 page says that it will wait 1 second between restarting services. However, in case lightdm cant start up, it will just continue pushing me bakc to the nonfunctional tty that its trying to log in and i cant go to an other tty to try and fix the problem.
Can s6 somehow be configures to wait some more time for restarting a specific service?
Title: Re: Delay to starting services?
Post by: Dudemanguy on 22 January 2021, 15:22:14
I don't think there's a way to specify how long s6 should wait before restarting a service in the service directory unfortunately. However, it is possible to stop a service from restarting with a s6-svc command (s6-svc -O /run/service/lightdm-srv). So you could put a file named "finish" in the /etc/s6/sv/lightdm-srv like so:
Code: [Select]
#!/usr/bin/execlineb -P
s6-svc -O /run/service/lightdm-srv
That should stop it from restarting. You would need to recompile and update the s6-rc database (sh /usr/share/libalpm/scripts/s6-rc-db-update-hook).

That being said... your problem sounds like lightdm does start up a graphical session (which causes the tty to switch) but somehow fails anyway? This shouldn't really happen. Could you post some logs?
Title: Re: Delay to starting services?
Post by: constatinus on 22 January 2021, 15:37:17
I don't think there's a way to specify how long s6 should wait before restarting a service in the service directory unfortunately. However, it is possible to stop a service from restarting with a s6-svc command (s6-svc -O /run/service/lightdm-srv). So you could put a file named "finish" in the /etc/s6/sv/lightdm-srv like so:
Code: [Select]
#!/usr/bin/execlineb -P
s6-svc -O /run/service/lightdm-srv
That should stop it from restarting. You would need to recompile and update the s6-rc database (sh /usr/share/libalpm/scripts/s6-rc-db-update-hook).

That being said... your problem sounds like lightdm does start up a graphical session (which causes the tty to switch) but somehow fails anyway? This shouldn't really happen. Could you post some logs?
Alright, just tried this out, it works, but i had to down lightdm first (isnt it already down/crashed? nevermind) via s6-rc -d change lightdm and then fire it back on via s6-rc -u change lightdm for it to start back up again (after i removed my intentional broken xorg config).
Well it was just xorg breaking at that time because i was editing the conf because my nvidia gpu wasnt working which i solved in an earlier post, its okay, lightdm works now of course.
Title: Re: Delay to starting services?
Post by: Dudemanguy on 22 January 2021, 17:17:22
Ah nvidia, of course.  :P