Feature #5510
openNeed a simple way to enable/disable package-installed services
0%
Description
The current practice where people write the same code over and over again pretty much in every package that unlinks the rc script on disabling the package and recreates it on enabling is completely braindead and sucks big time. Some basic outline:
- use /etc/rc.conf.d/ with per-package files? (rc.conf.local is definitely a bad idea).
- a simple tag in the packages service definition pointing to the package configuration variable used to enable/disable it.
- extend the write_rcfile() accordingly to put the required variable to the generated rc script automagically.
- make /etc/rc.start_packages check for disabled packages and skip those.
- fix up the dashboard and Status - Services to show disabled state properly.
Or, if you have some better idea, just share it...
Updated by Jim Thompson almost 9 years ago
- Tracker changed from Todo to Feature
- Assignee set to Renato Botelho
- Target version set to Future
Assigned to Renato, but really, the whole ball of string needs a serious re-think.
Updated by Kill Bill over 7 years ago
OK, some update here:
- a simple tag in the packages service definition pointing to the package configuration variable used to enable/disable it.
Well, the variable apparently already exists [1] but:
- this thing does not handle packages that install multiple services (e.g. Squid) particularly well
- most packages use either something else than "enable" or something else than "off" for this function.
- fix up the dashboard and Status - Services to show disabled state properly.
This apparently works when used properly in the package, e.g. https://github.com/pfsense/FreeBSD-ports/pull/309
Other than that, no progress.
[1] https://github.com/pfsense/pfsense/blob/master/src/etc/inc/service-utils.inc#L183