summaryrefslogtreecommitdiffstats
path: root/pw/pw_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/pw_group.c')
-rw-r--r--pw/pw_group.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pw/pw_group.c b/pw/pw_group.c
index 711ef68..289a4c8 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) {
@@ -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?)",