1
0
mirror of https://github.com/systemd/systemd.git synced 2025-04-01 18:50:16 +03:00

homectl: show full list of selected groups as they are added

This commit is contained in:
Lennart Poettering 2025-02-06 12:19:52 +01:00
parent cfe16540c8
commit 0fe3b0e4e2

View File

@ -2549,10 +2549,19 @@ static int create_interactively(void) {
return log_error_errno(r, "Failed to set userName field: %m");
_cleanup_strv_free_ char **available = NULL, **groups = NULL;
for (;;) {
_cleanup_free_ char *s = NULL;
strv_sort_uniq(groups);
if (!strv_isempty(groups)) {
_cleanup_free_ char *j = strv_join(groups, ", ");
if (!j)
return log_oom();
log_info("Currently selected groups: %s", j);
}
r = ask_string_full(&s,
group_completion_callback, &available,
"%s Please enter an auxiliary group for user %s (empty to continue, \"list\" to list available groups): ",