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:
parent
cfe16540c8
commit
0fe3b0e4e2
@ -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): ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user