]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: fix SYNOPSIS and usage()
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:47 +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/unshare.1
sys-utils/unshare.c

index ed316781506c2057f5556dd33918ec84c79e83a8..7c7d144d175a255f65e9fd2bd50d719e476a2e80 100644 (file)
@@ -4,11 +4,12 @@ unshare \- run program with some namespaces unshared from parent
 .SH SYNOPSIS
 .B unshare
 [options]
-.I program
-.RI [ arguments ]
+.RI [ program
+.RI [ arguments ]]
 .SH DESCRIPTION
 Unshares the indicated namespaces from the parent process and then executes
-the specified \fIprogram\fR.
+the specified \fIprogram\fR. If \fIprogram\fR is not given, then ``${SHELL}'' is
+run (default: /bin/sh).
 .PP
 The namespaces can optionally be made persistent by bind mounting
 /proc/\fIpid\fR/ns/\fItype\fR files to a filesystem path and entered with
index edd9bbe694b961d0e28e843d0d20269aa67bb6ee..0d02b70b3c80006456c217c99f6c1ddc3bd06e76 100644 (file)
@@ -243,7 +243,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);