Artix Linux Forum

Init systems => runit => Topic started by: Arch_user on 28 May 2021, 18:10:40

Title: rsm disable / enable issue
Post by: Arch_user on 28 May 2021, 18:10:40
I noticed strange behavior with "rsm" enable and disable command.
Problem:

Enabling service automatically starts the service. Same happens when disabling service
* command I use
Code: [Select]
sudo rsm disable NetworkManager

Expected:

It should just enable/disable service
Title: Re: rsm disable / enable issue
Post by: phoenix_king_rus on 29 May 2021, 08:19:33
This is how runit works: once you put service in /etc/runit/runsvdir/default it is automatically started. It can be probably prevented by adding file named "down" but with this file service can only be started by user
Title: Re: rsm disable / enable issue
Post by: linuxer on 29 May 2021, 20:05:35
I noticed strange behavior with "rsm" enable and disable command.
Problem:

Enabling service automatically starts the service. Same happens when disabling service
* command I use
Code: [Select]
sudo rsm disable NetworkManager

Expected:

It should just enable/disable service

This occurs due to the fact that runit has supervisor.

As @phoenix_king_rus  correctly mentioned the runsvdir, whatever is linked in the default starts automatically.
Title: Re: rsm disable / enable issue
Post by: VictorBrand on 04 June 2021, 23:53:21
If you don't want the service to be started when you enable it, just create the file named down in its directory before creating a symlink. E.g. for NetworkManger:
Code: [Select]
sudo touch /etc/runit/sv/NetworkManager/down
While this file is present, the service won't be started. In order to start it, delete this file.