Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Self-made runit init script (Read 3108 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Self-made runit init script

Hi everyone! I'm trying to setup this display manager https://github.com/drozdowsky/ly-void which looks pretty nice to me, since I'm using i3 with no desktop environment. I have succesfully installed it following the README. However, this one was made for void linux which keeps services in /etc/sv/ and links them to /var/service/ . So what I tried to do is creating /etc/runit/sv/ly-runit-service/run with this content https://raw.githubusercontent.com/drozdowsky/ly-void/master/res/ly-runit-service/run and I made it executable by running sudo chmod a+x /etc/runit/sv/ly-runit-service/run .

Then I tried:
- sudo ln -s /etc/runit/sv/ly-runit-service /etc/runit/service/
but if I try:
- sudo sv restart ly-runit-service
it says:
- fail: ly-runit-service: unable to change to service directory: file does not exist

So, I tried to do:
- sudo ln -s /etc/runit/sv/ly-runit-service /etc/runit/runsvdir/current/
and then:
- sudo sv restart ly-runit-service
and it says:
- timeout: down: ly-runit-service: 1s, normally up, want up
so I think that for some reason it is not able to start the service.

The strange thing is that it doesn't recognize the service when it is placed where it should be, and it does recognize the service when it is not placed where it should be. Why?

After all, the display manager doesn't start at start-up  :D  :'(

Re: Self-made runit init script

Reply #1
Services expected to run are located in /etc/runit/runsvdir/default. Once it is linked there, it will automatically try to start.
It seems, the script you use expects tty2 to be free, therefore you need to disable agetty-tty2 or change it to other tty in script itself
ARMtix

Re: Self-made runit init script

Reply #2
Services expected to run are located in /etc/runit/runsvdir/default. Once it is linked there, it will automatically try to start.
It seems, the script you use expects tty2 to be free, therefore you need to disable agetty-tty2 or change it to other tty in script itself
So, I changed tty2 with tty3 within the script, removed the link /etc/runit/runsvdir/current/ly-runit-service and created a new link with
sudo ln -s /etc/runit/sv/ly-runit-service /etc/runit/service
Then I rebooted and nothing happened

Re: Self-made runit init script

Reply #3
So, I changed tty2 with tty3 within the script, removed the link /etc/runit/runsvdir/current/ly-runit-service and created a new link with
sudo ln -s /etc/runit/sv/ly-runit-service /etc/runit/service
Then I rebooted and nothing happened
By default tty1 to tty6 are enabled, so you need at least tty7. Also, there is no /etc/runit/service, /etc/runit/runsvdir/default contains the running ones
ARMtix

Re: Self-made runit init script

Reply #4
By default tty1 to tty6 are enabled, so you need at least tty7. Also, there is no /etc/runit/service, /etc/runit/runsvdir/default contains the running ones
So, I've set tty7 within the file and linked it to /etc/runit/runsvdir/default. Now, when I reboot tty1 starts as default, and if I change to tty7 I see

Code: [Select]
Artix Linux 5.10.4-artix2-1 (tty7)

_

with no possibility to login, but I see continuous refreshes like it's trying to start Ly but it can't for some reason.

Plus, if I run sudo sv status ly-runit-service it says: down: ly-runit-service: 0s, normally up, want up
even if I restart it.

Re: Self-made runit init script

Reply #5
Try starting command in script manually
ARMtix


Re: Self-made runit init script

Reply #7
Run command from script as root, not as runit script.Then you'll get its error output
ARMtix


 

Re: Self-made runit init script

Reply #9
Most likely the same is in script
ARMtix



Re: Self-made runit init script

Reply #12
https://github.com/drozdowsky/ly-void  project is dead, 1.5 years was not updated.
Use runit service from this project and try the original, which is still devoleped https://github.com/nullgemm/ly (no need systemd).


I have installed this project https://github.com/nullgemm/ly and kept the same script for the runit service, but I'm still gettin the segmentation fault.

Re: Self-made runit init script

Reply #13
https://aur.archlinux.org/packages/ly/
Try building the AUR package. I've no idea how to set it up or if it works properly, but at least it didn't segfault when I tried it briefly so would get past that issue.

Re: Self-made runit init script

Reply #14
https://aur.archlinux.org/packages/ly/
Try building the AUR package. I've no idea how to set it up or if it works properly, but at least it didn't segfault when I tried it briefly so would get past that issue.
The thing is that if I simply run ly form terminal it works, but if I run this script https://raw.githubusercontent.com/drozdowsky/ly-void/master/res/ly-runit-service/run with sudo ./run I get the segmentation fault