diff options
author | 2022-05-09 11:20:47 +0000 | |
---|---|---|
committer | 2022-05-13 13:42:57 -0400 | |
commit | a21d590f878bf63510aa5692dd5668a56fa9f2db (patch) | |
tree | 597548deb78ed469dd3994700bd736f32224bb97 | |
parent | catalyst/stage4: don't split a single entry (diff) | |
download | catalyst-stage4-user-groups-fixes.tar.gz catalyst-stage4-user-groups-fixes.tar.bz2 catalyst-stage4-user-groups-fixes.zip |
catalyst/stage4: improve log messagestage4-user-groups-fixes
When creating a user with no additional groups, don't print a misleading
message saying the user will be created with an equals sign in the
username.
Signed-off-by: Daniel Cordero <gentoo.catalyst@0xdc.io>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r-- | catalyst/base/stagebase.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index d4875491..eb869c70 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -945,9 +945,11 @@ class StageBase(TargetBase, ClearBase, GenBase): log.debug("users: '=' separator not found on line " + x) log.debug("users: missing separator means no groups found") uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", x] + msg_create_user = "Creating user: '%s'" % usr if grp != '': uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", "-G", grp, usr] - log.notice("Creating user: '%s'", f"{usr}={grp}") + msg_create_user = "Creating user: '%s' in group(s): %s" % usr, grp + log.notice(msg_create_user) cmd(uacmd, env=self.env) def ssh_public_keys(self): |