summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-12-28 23:57:22 +0000
committerbapt <bapt@FreeBSD.org>2015-12-28 23:57:22 +0000
commitabb886fc3d3f64bb6e09305ad3a1f3e67adb0826 (patch)
treed995084063743843a9469c46fe5fb7f705ddb3bb /usr.sbin
parent9f8cae598dd30e495c690eb4834da53e9935c2bb (diff)
downloadFreeBSD-src-abb886fc3d3f64bb6e09305ad3a1f3e67adb0826.zip
FreeBSD-src-abb886fc3d3f64bb6e09305ad3a1f3e67adb0826.tar.gz
Restore dryrun support for pw groupmod
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pw/pw_group.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c
index 67beab9..289a4c8 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?)",
OpenPOWER on IntegriCloud