diff options
author | Chris Lumens <clumens@redhat.com> | 2006-05-03 17:44:54 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-05-03 17:44:54 +0000 |
commit | 422211b0bac84edd23bdff5e79a8011937372d00 (patch) | |
tree | 707646a0cbbb5e42a7b97213e138d9c0653a0b65 /backend.py | |
parent | e6e28b69681a4d5451119795923538808afa2e9d (diff) | |
download | anaconda-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.py | 20 |
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 |