summaryrefslogtreecommitdiffstats
path: root/backend.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-05-03 17:44:54 +0000
committerChris Lumens <clumens@redhat.com>2006-05-03 17:44:54 +0000
commit422211b0bac84edd23bdff5e79a8011937372d00 (patch)
tree707646a0cbbb5e42a7b97213e138d9c0653a0b65 /backend.py
parente6e28b69681a4d5451119795923538808afa2e9d (diff)
downloadanaconda-422211b0bac84edd23bdff5e79a8011937372d00.tar.gz
anaconda-422211b0bac84edd23bdff5e79a8011937372d00.tar.xz
anaconda-422211b0bac84edd23bdff5e79a8011937372d00.zip
Add support for making users and for enabling/disabling services via
kickstart.
Diffstat (limited to 'backend.py')
-rw-r--r--backend.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/backend.py b/backend.py
index 77344e2c0..912e21409 100644
--- a/backend.py
+++ b/backend.py
@@ -51,6 +51,26 @@ class AnacondaBackend:
if flags.setupFilesystems:
syslog.stop()
+ if id.partitions.isKickstart:
+ for svc in id.ksdata.services["disabled"]:
+ iutil.execWithRedirect("/sbin/chkconfig",
+ ["/sbin/chkconfig", svc, "off"],
+ stdout="/dev/tty5", stderr="/dev/tty5",
+ root="/mnt/sysimage")
+
+ for svc in id.ksdata.services["enabled"]:
+ iutil.execWithRedirect("/sbin/chkconfig",
+ ["/sbin/chkconfig", svc, "on"],
+ stdout="/dev/tty5", stderr="/dev/tty5",
+ root="/mnt/sysimage")
+
+ for ud in id.ksdata.userList:
+ if id.users.createUser(ud.name, ud.password, ud.isCrypted,
+ ud.groups, ud.homedir, ud.shell,
+ ud.uid) == None:
+ log.error("User %s already exists, not creating." % ud.name)
+
+
def doInstall(self, intf, id, instPath):
pass