]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
nsenter: fix usage() and improve man page
authorKarel Zak <kzak@redhat.com>
Mon, 9 Jan 2017 11:48:14 +0000 (12:48 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 9 Jan 2017 11:50:09 +0000 (12:50 +0100)
The "program" is optional and $SHELL is executed by default.

Addresses: https://github.com/karelzak/util-linux/issues/389
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/nsenter.1
sys-utils/nsenter.c

index 66e3cecfee2f64f9b7a65d28ac3176a3c4eb8f53..95f28ae435e66f693957124fa584a68728fd85ee 100644 (file)
@@ -8,7 +8,9 @@ nsenter \- run program with namespaces of other processes
 .RI [ arguments ]]
 .SH DESCRIPTION
 Enters the namespaces of one or more other processes and then executes the specified
-program.  Enterable namespaces are:
+\fIprogram\fP. If \fIprogram\fP is not given, then ``${SHELL}'' is run (default: /bin\:/sh).
+.PP
+Enterable namespaces are:
 .TP
 .B mount namespace
 Mounting and unmounting filesystems will not affect the rest of the system,
@@ -91,9 +93,6 @@ flag in
 .BR clone (2).
 .TP
 See \fBclone\fP(2) for the exact semantics of the flags.
-.TP
-If \fIprogram\fP is not given, then ``${SHELL}'' is run (default: /bin\:/sh).
-
 .SH OPTIONS
 Various of the options below that relate to namespaces take an optional
 .I file
index 6dc7b225cfcf9eb87424a0c979e6adb4fcc570af..afa1b9c50251f593edac48e8f0686c7dda4b9d38 100644 (file)
@@ -70,7 +70,7 @@ static void usage(int status)
        FILE *out = status == EXIT_SUCCESS ? stdout : stderr;
 
        fputs(USAGE_HEADER, out);
-       fprintf(out, _(" %s [options] <program> [<argument>...]\n"),
+       fprintf(out, _(" %s [options] [<program> [<argument>...]]\n"),
                program_invocation_short_name);
 
        fputs(USAGE_SEPARATOR, out);