summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/useradd-staticids.bbclass12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index c156a12ee5..2d282c0d71 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -77,6 +77,7 @@ def update_useradd_static_config(d):
77 parser.add_argument("-N", "--no-user-group", dest="user_group", help="do not create a group with the same name as the user", action="store_const", const=False) 77 parser.add_argument("-N", "--no-user-group", dest="user_group", help="do not create a group with the same name as the user", action="store_const", const=False)
78 parser.add_argument("-o", "--non-unique", help="allow to create users with duplicate (non-unique UID)", action="store_true") 78 parser.add_argument("-o", "--non-unique", help="allow to create users with duplicate (non-unique UID)", action="store_true")
79 parser.add_argument("-p", "--password", metavar="PASSWORD", help="encrypted password of the new account") 79 parser.add_argument("-p", "--password", metavar="PASSWORD", help="encrypted password of the new account")
80 parser.add_argument("-P", "--clear-password", metavar="CLEAR_PASSWORD", help="use this clear password for the new account")
80 parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into") 81 parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
81 parser.add_argument("-r", "--system", help="create a system account", action="store_true") 82 parser.add_argument("-r", "--system", help="create a system account", action="store_true")
82 parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell of the new account") 83 parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell of the new account")
@@ -195,7 +196,10 @@ def update_useradd_static_config(d):
195 newparam += ['', ' --no-create-home'][uaargs.create_home is False] 196 newparam += ['', ' --no-create-home'][uaargs.create_home is False]
196 newparam += ['', ' --no-user-group'][uaargs.user_group is False] 197 newparam += ['', ' --no-user-group'][uaargs.user_group is False]
197 newparam += ['', ' --non-unique'][uaargs.non_unique] 198 newparam += ['', ' --non-unique'][uaargs.non_unique]
198 newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None] 199 if uaargs.password != None:
200 newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None]
201 elif uaargs.clear_password:
202 newparam += ['', ' --clear-password %s' % uaargs.clear_password][uaargs.clear_password != None]
199 newparam += ['', ' --root %s' % uaargs.root][uaargs.root != None] 203 newparam += ['', ' --root %s' % uaargs.root][uaargs.root != None]
200 newparam += ['', ' --system'][uaargs.system] 204 newparam += ['', ' --system'][uaargs.system]
201 newparam += ['', ' --shell %s' % uaargs.shell][uaargs.shell != None] 205 newparam += ['', ' --shell %s' % uaargs.shell][uaargs.shell != None]
@@ -216,6 +220,7 @@ def update_useradd_static_config(d):
216 parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults") 220 parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
217 parser.add_argument("-o", "--non-unique", help="allow to create groups with duplicate (non-unique) GID", action="store_true") 221 parser.add_argument("-o", "--non-unique", help="allow to create groups with duplicate (non-unique) GID", action="store_true")
218 parser.add_argument("-p", "--password", metavar="PASSWORD", help="use this encrypted password for the new group") 222 parser.add_argument("-p", "--password", metavar="PASSWORD", help="use this encrypted password for the new group")
223 parser.add_argument("-P", "--clear-password", metavar="CLEAR_PASSWORD", help="use this clear password for the new group")
219 parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into") 224 parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
220 parser.add_argument("-r", "--system", help="create a system account", action="store_true") 225 parser.add_argument("-r", "--system", help="create a system account", action="store_true")
221 parser.add_argument("GROUP", help="Group name of the new group") 226 parser.add_argument("GROUP", help="Group name of the new group")
@@ -277,7 +282,10 @@ def update_useradd_static_config(d):
277 newparam += ['', ' --gid %s' % gaargs.gid][gaargs.gid != None] 282 newparam += ['', ' --gid %s' % gaargs.gid][gaargs.gid != None]
278 newparam += ['', ' --key %s' % gaargs.key][gaargs.key != None] 283 newparam += ['', ' --key %s' % gaargs.key][gaargs.key != None]
279 newparam += ['', ' --non-unique'][gaargs.non_unique] 284 newparam += ['', ' --non-unique'][gaargs.non_unique]
280 newparam += ['', ' --password %s' % gaargs.password][gaargs.password != None] 285 if gaargs.password != None:
286 newparam += ['', ' --password %s' % gaargs.password][gaargs.password != None]
287 elif gaargs.clear_password:
288 newparam += ['', ' --clear-password %s' % gaargs.clear_password][gaargs.clear_password != None]
281 newparam += ['', ' --root %s' % gaargs.root][gaargs.root != None] 289 newparam += ['', ' --root %s' % gaargs.root][gaargs.root != None]
282 newparam += ['', ' --system'][gaargs.system] 290 newparam += ['', ' --system'][gaargs.system]
283 newparam += ' %s' % gaargs.GROUP 291 newparam += ' %s' % gaargs.GROUP