* src/gpasswd.c, src/groupmems.c: Split the groupmems and gpasswd
Usage string. It was changed anyway to add the --help option.
This commit is contained in:
parent
91b60a955c
commit
32e2ef34a3
@ -1,3 +1,8 @@
|
||||
2009-09-05 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/gpasswd.c, src/groupmems.c: Split the groupmems and gpasswd
|
||||
Usage string. It was changed anyway to add the --help option.
|
||||
|
||||
2009-09-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* NEWS, src/userdel.c, src/lastlog.c, src/gpasswd.c,
|
||||
|
@ -130,27 +130,25 @@ static void log_gpasswd_success_gshadow (unused void *arg);
|
||||
*/
|
||||
static void usage (int status)
|
||||
{
|
||||
fprintf (status ? stderr : stdout,
|
||||
_("Usage: %s [option] GROUP\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -a, --add USER add USER to GROUP\n"
|
||||
" -d, --delete USER remove USER from GROUP\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -r, --remove-password remove the GROUP's password\n"
|
||||
" -R, --restrict restrict access to GROUP to its members\n"
|
||||
" -M, --members USER,... set the list of members of GROUP\n"
|
||||
"%s\n"
|
||||
"\n"),
|
||||
Prog,
|
||||
FILE *usageout = status ? stderr : stdout;
|
||||
(void) fprintf (usageout,
|
||||
_("Usage: %s [option] GROUP\n"
|
||||
"\n"
|
||||
"Options:\n"),
|
||||
Prog);
|
||||
(void) fputs (_(" -a, --add USER add USER to GROUP\n"), usageout);
|
||||
(void) fputs (_(" -d, --delete USER remove USER from GROUP\n"), usageout);
|
||||
(void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
|
||||
(void) fputs (_(" -r, --remove-password remove the GROUP's password\n"), usageout);
|
||||
(void) fputs (_(" -R, --restrict restrict access to GROUP to its members\n"), usageout);
|
||||
(void) fputs (_(" -M, --members USER,... set the list of members of GROUP\n"), usageout);
|
||||
#ifdef SHADOWGRP
|
||||
_(" -A, --administrators ADMIN,...\n"
|
||||
" set the list of administrators for GROUP\n"
|
||||
"Except for the -A and -M options, the options cannot be combined.\n")
|
||||
(void) fputs (_(" -A, --administrators ADMIN,...\n"
|
||||
" set the list of administrators for GROUP\n"), usageout);
|
||||
(void) fputs (_("Except for the -A and -M options, the options cannot be combined.\n"), usageout);
|
||||
#else
|
||||
_("The options cannot be combined.\n")
|
||||
(void) fputs (_("The options cannot be combined.\n"), usageout);
|
||||
#endif
|
||||
);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2000 , International Business Machines
|
||||
* George Kraft IV, gk4@us.ibm.com, 03/23/2000
|
||||
* Copyright (c) 2000 - 2006, Tomasz Kłoczko
|
||||
* Copyright (c) 2007 - 2008, Nicolas François
|
||||
* Copyright (c) 2007 - 2009, Nicolas François
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -363,19 +363,21 @@ static void display_members (const char *const *members)
|
||||
|
||||
static void usage (int status)
|
||||
{
|
||||
(void) fputs (_("Usage: groupmems [options] [action]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -g, --group groupname change groupname instead of the user's group\n"
|
||||
" (root only)\n"
|
||||
"\n"
|
||||
"Actions:\n"
|
||||
" -a, --add username add username to the members of the group\n"
|
||||
" -d, --delete username remove username from the members of the group\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -p, --purge purge all members from the group\n"
|
||||
" -l, --list list the members of the group\n"
|
||||
"\n"), status ? stderr : stdout);
|
||||
FILE *usageout = status ? stderr : stdout;
|
||||
(void) fprintf (usageout,
|
||||
_("Usage: %s [options] [action]\n"
|
||||
"\n"
|
||||
"Options:\n"),
|
||||
Prog);
|
||||
(void) fputs (_(" -g, --group groupname change groupname instead of the user's group\n"
|
||||
" (root only)\n"), usageout);
|
||||
(void) fputs (_("\n"), usageout);
|
||||
(void) fputs (_("Actions:\n"), usageout);
|
||||
(void) fputs (_(" -a, --add username add username to the members of the group\n"), usageout);
|
||||
(void) fputs (_(" -d, --delete username remove username from the members of the group\n"), usageout);
|
||||
(void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
|
||||
(void) fputs (_(" -p, --purge purge all members from the group\n"), usageout);
|
||||
(void) fputs (_(" -l, --list list the members of the group\n"), usageout);
|
||||
fail_exit (status);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user