Exemplo n.º 1
0
    def apply(self, ksservices):

        if fs.chrootentitycheck('systemctl', self.instroot):
            for s in ksservices.enabled:
                subprocess.call(['systemctl', 'enable', s], preexec_fn=self.chroot)
            for s in ksservices.disabled:
                subprocess.call(['systemctl', 'disable', s], preexec_fn=self.chroot)
Exemplo n.º 2
0
    def apply(self, ksservices):

        if fs.chrootentitycheck('chkconfig', self.instroot):
            for s in ksservices.enabled:
                subprocess.call(['chkconfig', s, 'on'], preexec_fn=self.chroot)
            for s in ksservices.disabled:
                subprocess.call(['chkconfig', s, 'off'], preexec_fn=self.chroot)