Home | News | Download | Packages | Forum | Wiki | Github

What to do if you deleted /var/service when you forgot to put the /directory after it?


Yes, I did it, I accidentally deleted /var/service, thankfully, everything on my system works alright without the autostarted services. However, NetworkManager is really broken and my /var/service that I tried to put together is totally broken it seems.

What does a normal /var/service look like and what links or conditions are it that i’m missing?

Yes I know its hilarious that I actually deleted /var/service, even funnier that everything still works after removing my service supervisor.

(Masato the Empty) #2

hehe. sorry…
/var/service which contains symlinks to /etc/sv/$service, is actually a symlink to /run/runit/runsvdir/current. (which itself is a symlink to a symlink… ultimately, everything really lives in subdirectories of /etc/runit) I think that rather than attempting to rebuild /var/service, you simply need to re-create the symlink.
# cd /var/
# ln -s …/run/runit/runsvdir/current service


I knew it! I could smell the sym links a mile away…
What I did is mount the live fs and copy /var/service to my home dir.


Such a clever use of the symlinks ! :arrows_clockwise:

That’s something I haven’t seen before in other linux distros.

At first I was a little confused by the Void system organization with all these symlinks to handle the services…
Maybe it’s just specific to Runit, not to Void in particular ?
I don’t know, because I never used Runit outside of the Void…

(To be honest, my attempt to use Runit in Debian was… a disaster. :frowning2: lol)

@anonvoid Your story proves the robustness of Void. :relaxed:


This turned out to be a major win for void linx. I got super tired and deleted an important folder and yet everything was OK upon reboot.

Well done Void Devs.

(Frankie Wilde) #6

A life saver topic :slight_smile:


I think I’m going to write a command line tool to use runit for void that makes it impossible to make this mistake.
If so I’ll post source in a new topic.

(Benjamin) #8

Why not extend the sv-helper for this purpose?

Is there a need for a command line helper for runit?