* src/usermod.c, src/useraddd.c: Fix the usage string so that it
does not change depending on the configure option. Use a format.
This commit is contained in:
parent
80a30dfe6f
commit
554d4f6b95
@ -1,3 +1,8 @@
|
||||
2009-04-11 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/usermod.c, src/useraddd.c: Fix the usage string so that it
|
||||
does not change depending on the configure option. Use a format.
|
||||
|
||||
2009-04-11 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/gpasswd.c: Fix the usage of the unused macro.
|
||||
|
@ -144,7 +144,8 @@ static bool
|
||||
rflg = false, /* create a system account */
|
||||
sflg = false, /* shell program for new account */
|
||||
uflg = false, /* specify user ID for new account */
|
||||
Uflg = false; /* create a group having the same name as the user */
|
||||
Uflg = false, /* create a group having the same name as the user */
|
||||
Zflg = false; /* new selinux user */
|
||||
|
||||
static bool home_added = false;
|
||||
|
||||
@ -664,7 +665,8 @@ static int get_groups (char *list)
|
||||
*/
|
||||
static void usage (void)
|
||||
{
|
||||
fputs (_("Usage: useradd [options] LOGIN\n"
|
||||
fprintf (stderr,
|
||||
_("Usage: useradd [options] LOGIN\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -b, --base-dir BASE_DIR base directory for the new user account\n"
|
||||
@ -698,10 +700,14 @@ static void usage (void)
|
||||
" -s, --shell SHELL the login shell for the new user account\n"
|
||||
" -u, --uid UID force use the UID for the new user account\n"
|
||||
" -U, --user-group create a group with the same name as the user\n"
|
||||
"%s"
|
||||
"\n"),
|
||||
#ifdef WITH_SELINUX
|
||||
" -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n"
|
||||
_(" -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n")
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
"\n"), stderr);
|
||||
);
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
@ -1173,6 +1179,7 @@ static void process_flags (int argc, char **argv)
|
||||
case 'Z':
|
||||
if (is_selinux_enabled () > 0) {
|
||||
user_selinux = optarg;
|
||||
Zflg = true;
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
_("%s: -Z requires SELinux enabled kernel\n"),
|
||||
|
@ -300,7 +300,8 @@ static int get_groups (char *list)
|
||||
*/
|
||||
static void usage (void)
|
||||
{
|
||||
fputs (_("Usage: usermod [options] LOGIN\n"
|
||||
fprintf (stderr,
|
||||
_("Usage: usermod [options] LOGIN\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -c, --comment COMMENT new value of the GECOS field\n"
|
||||
@ -323,10 +324,14 @@ static void usage (void)
|
||||
" -s, --shell SHELL new login shell for the user account\n"
|
||||
" -u, --uid UID new UID for the user account\n"
|
||||
" -U, --unlock unlock the user account\n"
|
||||
"%s"
|
||||
"\n"),
|
||||
#ifdef WITH_SELINUX
|
||||
" -Z, --selinux-user new SELinux user mapping for the user account\n"
|
||||
_(" -Z, --selinux-user new SELinux user mapping for the user account\n")
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
"\n"), stderr);
|
||||
);
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user