* [gentoo-catalyst] [PATCH v2 4/4] stage4/users: improve log message
@ 2022-05-09 11:20 99% ` Daniel Cordero
0 siblings, 0 replies; 1+ results
From: Daniel Cordero @ 2022-05-09 11:20 UTC (permalink / raw
To: gentoo-catalyst
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.
---
catalyst/base/stagebase.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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):
--
2.35.1
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-04-21 7:08 [gentoo-catalyst] [PATCH 4/4] stage4/groups: improve log message Daniel Cordero
2022-05-09 11:20 99% ` [gentoo-catalyst] [PATCH v2 4/4] stage4/users: " Daniel Cordero
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox