[services-openrc] Follow services-systemd configuration example

- Based on comments from #974, follow the configuration
   scheme from services-systemd, so with separate lists
   "services" and "disable". This ties it **slightly**
   less closely to the commands passed to rc-config.
main
Adriaan de Groot 7 years ago
parent dbcc419218
commit b02ee3cd8d

@ -36,7 +36,12 @@ class OpenrcController:
def __init__(self):
self.root = libcalamares.globalstorage.value('rootMountPoint')
self.services = libcalamares.job.configuration.get('services', [])
# Translate the entries in the config to the actions passed to rc-config
self.services = dict()
self.services["add"] = libcalamares.job.configuration.get('services', [])
self.services["del"] = libcalamares.job.configuration.get('disable', [])
self.initdDir = libcalamares.job.configuration['initdDir']
self.runlevelsDir = libcalamares.job.configuration['runlevelsDir']

@ -13,25 +13,25 @@ initdDir: /etc/init.d
# runlevelsDir: holds the runlevels directory location
runlevelsDir: /etc/runlevels
# services: each subkey of *services* is an action to take;
# supported actions are "add" and "del". The each subkey
# has a list of entries as value, and each entry has two
# fields:
# services: a list of entries to **enable**
# disable: a list of entries to **disable**
#
# Each entry has two fields:
# - name: the service name
# - runlevel: can hold any runlevel present on the target system;
# if no runlevel is provided, "default" is assumed.
#
# # Example services:
# # Example services and disable settings:
# # - add foo1 to default
# # - add foo2 to nonetwork
# # - remove foo3 from default
# services:
# add:
# - name: foo1
# - name: foo2
# runlevel: nonetwork
# del:
# - name: foo3
# runlevel: default
# - name: foo1
# - name: foo2
# runlevel: nonetwork
# disable:
# - name: foo3
# runlevel: default
services: []
disable: []

Loading…
Cancel
Save