Xenial changes

This commit is contained in:
Ian Gulliver
2016-07-18 18:40:07 +00:00
parent e65035d230
commit 95315dfa77
3 changed files with 41 additions and 43 deletions

View File

@@ -73,3 +73,10 @@ class IconModule(object):
with open(os.path.join(self._chroot_path, 'etc', 'modules'), 'a') as fh:
for module in modules:
fh.write('%s\n' % module)
def ServiceFile(self, service):
path = os.path.join(self._chroot_path, 'lib', 'systemd', 'system', service)
return open(path, 'w')
def EnableService(self, service):
self.ExecChroot('systemctl', 'enable', service)