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