From: Daniel Cordero <gentoo.catalyst@0xdc.io>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH v2 4/4] stage4/users: improve log message
Date: Mon, 9 May 2022 11:20:47 +0000 [thread overview]
Message-ID: <20220509112047.2422391-1-gentoo.catalyst@0xdc.io> (raw)
In-Reply-To: <20220421070826.92638-4-gentoo.catalyst@0xdc.io>
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
next prev parent reply other threads:[~2022-05-09 11:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 23:37 [gentoo-catalyst] [PATCH 1/3] catalyst: support 3 new options Matt Turner
2022-03-27 23:37 ` [gentoo-catalyst] [PATCH 2/3] catalyst: add new options to stage4 step list Matt Turner
2022-03-27 23:37 ` [gentoo-catalyst] [PATCH 3/3] example: document new options Matt Turner
2022-04-19 14:17 ` [gentoo-catalyst] [PATCH 1/3] catalyst: support 3 " Daniel Cordero
2022-04-20 23:25 ` Matt Turner
2022-04-19 15:23 ` Daniel Cordero
2022-04-20 23:26 ` Matt Turner
2022-04-21 7:08 ` [gentoo-catalyst] [PATCH 1/4] stage4: fix handling of groups, users and keys Daniel Cordero
2022-04-21 7:08 ` [gentoo-catalyst] [PATCH 2/4] stage4/groups: don't run split on a list Daniel Cordero
2022-04-21 7:08 ` [gentoo-catalyst] [PATCH 3/4] stage4/users: don't split a single entry Daniel Cordero
2022-04-21 7:08 ` [gentoo-catalyst] [PATCH 4/4] stage4/groups: improve log message Daniel Cordero
2022-04-21 21:01 ` Daniel Cordero
2022-05-09 11:20 ` Daniel Cordero [this message]
2022-05-09 17:06 ` [gentoo-catalyst] [PATCH 1/4] stage4: fix handling of groups, users and keys Matt Turner
2022-05-12 10:09 ` Daniel Cordero
2022-05-13 17:45 ` Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220509112047.2422391-1-gentoo.catalyst@0xdc.io \
--to=gentoo.catalyst@0xdc.io \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox