Backport fix from upstream to use systemctl instead of chkconfig (RH#1696064)

This commit is contained in:
Neal Gompa 2019-04-04 07:05:53 -04:00
parent 624fb1ca7c
commit cdacbd1c85
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,32 @@
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

View File

@ -17,12 +17,16 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 26.1
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
License: GPLv2
URL: https://github.com/livecd-tools/livecd-tools
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
# Backport from upstream
## Use systemctl instead of chkconfig (rhbz#1696064)
Patch0001: 0001-Use-systemctl-instead-of-chkconfig-for-enabling-disa.patch
%if %{with python2}
BuildRequires: python2-devel
%endif
@ -217,6 +221,9 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif
%changelog
* Thu Apr 04 2019 Neal Gompa <ngompa13@gmail.com> - 1:26.1-3
- Backport fix from upstream to use systemctl instead of chkconfig (RH#1696064)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:26.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild