Project

General

Profile

Actions

Feature #5510

open

Need a simple way to enable/disable package-installed services

Added by Kill Bill about 9 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Package System
Target version:
Start date:
11/21/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

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...

Actions #1

Updated by Jim Thompson about 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.

Actions #2

Updated by Kill Bill almost 8 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

Actions #3

Updated by Renato Botelho over 2 years ago

  • Assignee deleted (Renato Botelho)
Actions

Also available in: Atom PDF