diff options
author | Jeremy Katz <katzj@redhat.com> | 2006-07-28 20:21:52 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2006-07-28 20:21:52 +0000 |
commit | fa79bcd5e278c3be8c3c30ccb009f5c62bf2a9f1 (patch) | |
tree | 40713f912ee15ac5d073ea017acc9eb11bce4a70 | |
parent | 07fd45cf256752fcebd7719c4c1b9939c675931f (diff) | |
download | anaconda-fa79bcd5e278c3be8c3c30ccb009f5c62bf2a9f1.tar.gz anaconda-fa79bcd5e278c3be8c3c30ccb009f5c62bf2a9f1.tar.xz anaconda-fa79bcd5e278c3be8c3c30ccb009f5c62bf2a9f1.zip |
2006-07-28 Jeremy Katz <katzj@redhat.com>
* users.py (Users.createUser): Create users under the rootpath
(Clark Williams)
* instdata.py (InstallData.write): Use the rootpath
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | instdata.py | 2 | ||||
-rw-r--r-- | users.py | 5 |
3 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,9 @@ 2006-07-28 Jeremy Katz <katzj@redhat.com> + * users.py (Users.createUser): Create users under the rootpath + (Clark Williams) + * instdata.py (InstallData.write): Use the rootpath + * packages.py (setFileCons): Normalize path so we don't hit a bug in matchpathcon diff --git a/instdata.py b/instdata.py index 24747ba24..1f3852832 100644 --- a/instdata.py +++ b/instdata.py @@ -175,7 +175,7 @@ class InstallData: for ud in self.ksdata.userList: if self.users.createUser(ud.name, ud.password, ud.isCrypted, ud.groups, ud.homedir, ud.shell, - ud.uid) == None: + ud.uid, root=anaconda.rootPath) == None: log.error("User %s already exists, not creating." % ud.name) @@ -18,6 +18,7 @@ import crypt import random import tempfile import os +import os.path def createLuserConf(instPath): """Writes a libuser.conf for instPath.""" @@ -59,7 +60,7 @@ class Users: self.admin = libuser.admin() def createUser (self, name, password=None, isCrypted=False, groups=[], - homedir=None, shell=None, uid=None): + homedir=None, shell=None, uid=None, root="/mnt/sysimage"): if self.admin.lookupUserByName(name): return None @@ -77,7 +78,7 @@ class Users: homedir = "/home/" + name # Do this to make the user's home dir under the install root. - userEnt.set(libuser.HOMEDIRECTORY, "/mnt/sysimage/" + homedir) + userEnt.set(libuser.HOMEDIRECTORY, os.path.join(root, homedir)) if shell: userEnt.set(libuser.LOGINSHELL, shell) |