From 2dfa0944c340e315dbabe8b78f98b4e0bf20604a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 15 Jan 2016 02:28:57 +0100 Subject: [PATCH] [services] Document that systemctl enable/disable are chroot-safe http://0pointer.de/blog/projects/changing-roots.html explicitly documents the "systemctl enable" and "systemctl disable" commands to work in a chroot. --- src/modules/services/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/services/main.py b/src/modules/services/main.py index f827cd20a..e195faff4 100644 --- a/src/modules/services/main.py +++ b/src/modules/services/main.py @@ -28,6 +28,11 @@ def run(): targets = libcalamares.job.configuration['targets'] disable = libcalamares.job.configuration['disable'] + # note that the "systemctl enable" and "systemctl disable" commands used + # here will work in a chroot; in fact, they are the only systemctl commands + # that support that, see: + # http://0pointer.de/blog/projects/changing-roots.html + # enable services for svc in services: ec = libcalamares.utils.target_env_call(['systemctl', 'enable', '{}.service'.format(svc['name'])])