summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-12-28 23:57:22 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-12-28 23:57:22 +0000
commit653a82f1ba01a2c969ef6a5780535959dd2e78ab (patch)
tree3d47be70edddb16381a2fe03981bf9d4a5fe2f7e
parent3fad668210aeec37d615b35f1814e65454c5c27c (diff)
downloadpw-darwin-653a82f1ba01a2c969ef6a5780535959dd2e78ab.tar.gz
pw-darwin-653a82f1ba01a2c969ef6a5780535959dd2e78ab.tar.zst
pw-darwin-653a82f1ba01a2c969ef6a5780535959dd2e78ab.zip
Restore dryrun support for pw groupmod
-rw-r--r--pw/pw_group.c5
1 files changed, 5 insertions, 0 deletions
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?)",