You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
33 lines
1.3 KiB
6 years ago
|
From 13d352e87d2bc055273e34760ba8b389270519ed Mon Sep 17 00:00:00 2001
|
||
|
From: Neal Gompa <ngompa13@gmail.com>
|
||
|
Date: Thu, 4 Apr 2019 07:01:17 -0400
|
||
|
Subject: [PATCH] Use systemctl instead of chkconfig for enabling/disabling
|
||
|
services
|
||
|
|
||
|
---
|
||
|
imgcreate/kickstart.py | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
|
||
|
index 32d26b2..62396b3 100644
|
||
|
--- a/imgcreate/kickstart.py
|
||
|
+++ b/imgcreate/kickstart.py
|
||
|
@@ -267,11 +267,11 @@ class ServicesConfig(KickstartConfig):
|
||
|
"""A class to apply a kickstart services configuration to a system."""
|
||
|
def apply(self, ksservices):
|
||
|
|
||
|
- if fs.chrootentitycheck('chkconfig', self.instroot):
|
||
|
+ if fs.chrootentitycheck('systemctl', self.instroot):
|
||
|
for s in ksservices.enabled:
|
||
|
- subprocess.call(['chkconfig', s, 'on'], preexec_fn=self.chroot)
|
||
|
+ subprocess.call(['systemctl', 'enable', s], preexec_fn=self.chroot)
|
||
|
for s in ksservices.disabled:
|
||
|
- subprocess.call(['chkconfig', s, 'off'], preexec_fn=self.chroot)
|
||
|
+ subprocess.call(['systemctl', 'disable', s], preexec_fn=self.chroot)
|
||
|
|
||
|
class XConfig(KickstartConfig):
|
||
|
"""A class to apply a kickstart X configuration to a system."""
|
||
|
--
|
||
|
2.20.1
|
||
|
|