From 36a8b62f3a5f9b0e9764b54bde2fd1758ff768b4 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Mon, 28 Dec 2015 23:57:22 +0000 Subject: [PATCH] Restore dryrun support for pw groupmod --- usr.sbin/pw/pw_group.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c index 67beab9788e8..289a4c85df70 100644 --- a/usr.sbin/pw/pw_group.c +++ b/usr.sbin/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?)",