]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Restore dryrun support for pw groupmod
authorBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 28 Dec 2015 23:57:22 +0000 (23:57 +0000)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 28 Dec 2015 23:57:22 +0000 (23:57 +0000)
pw/pw_group.c

index 67beab9788e83f1ec0edb9d6719af44a52cb3aff..289a4c85df7029768041505d9387525cb1979e27 100644 (file)
@@ -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?)",