Skip to main content
Topic: Delay to starting services? (Read 817 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Delay to starting services?

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?

 

Re: Delay to starting services?

Reply #1
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?

Re: Delay to starting services?

Reply #2
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.

Re: Delay to starting services?

Reply #3
Ah nvidia, of course.  :P