From 66d9e5fe286aaad023911a859e7b61e780a9740b Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Mon, 19 Oct 2015 18:29:32 +0000 Subject: Initialize `quiet` to false so `pw groupnext` again prints out the next gid by default Reported by: Florian Degner MFC after: 1 week PR: 203876 Sponsored by: EMC / Isilon Storage Division --- pw/pw_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pw/pw_group.c') diff --git a/pw/pw_group.c b/pw/pw_group.c index 711ef68..67beab9 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -259,7 +259,7 @@ pw_group_next(int argc, char **argv, char *arg1 __unused) struct userconf *cnf; const char *cfg = NULL; int ch; - bool quiet; + bool quiet = false; while ((ch = getopt(argc, argv, "Cq")) != -1) { switch (ch) { -- cgit v1.2.3 From 764d9def266a32c90e034a2275bef7bc4658d767 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Mon, 28 Dec 2015 23:57:22 +0000 Subject: Restore dryrun support for pw groupmod --- pw/pw_group.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pw/pw_group.c') diff --git a/pw/pw_group.c b/pw/pw_group.c index 67beab9..289a4c8 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -664,6 +664,11 @@ pw_group_mod(int argc, char **argv, char *arg1) grp_add_members(&grp, newmembers); } + if (dryrun) { + print_group(grp, pretty); + return (EXIT_SUCCESS); + } + if ((rc = chggrent(name, grp)) != 0) { if (rc == -1) errx(EX_IOERR, "group '%s' not available (NIS?)", -- cgit v1.2.3