From: Karel Zak Date: Mon, 9 Jan 2017 11:48:14 +0000 (+0100) Subject: unshare: fix SYNOPSIS and usage() X-Git-Tag: v2.30-rc1~314 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5672517fdf37df8f2e3fbf13065723d0486ca56;p=thirdparty%2Futil-linux.git unshare: fix SYNOPSIS and usage() The "program" is optional and $SHELL is executed by default. Addresses: https://github.com/karelzak/util-linux/issues/389 Signed-off-by: Karel Zak --- diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1 index ed31678150..7c7d144d17 100644 --- a/sys-utils/unshare.1 +++ b/sys-utils/unshare.1 @@ -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 diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index edd9bbe694..0d02b70b3c 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -243,7 +243,7 @@ static void usage(int status) FILE *out = status == EXIT_SUCCESS ? stdout : stderr; fputs(USAGE_HEADER, out); - fprintf(out, _(" %s [options] [...]\n"), + fprintf(out, _(" %s [options] [ [...]]\n"), program_invocation_short_name); fputs(USAGE_SEPARATOR, out);