From 6dd1c8b1aa44268a11ddebabacf5fc583c523da6 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Fri, 17 Nov 2006 18:48:33 +0000 Subject: [PATCH] Fix chcontext --help and --version. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2383 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- scripts/chcontext | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/chcontext b/scripts/chcontext index 7ffbd45..93b0959 100755 --- a/scripts/chcontext +++ b/scripts/chcontext @@ -27,7 +27,7 @@ test -e "$UTIL_VSERVER_VARS" || { function showHelp() { echo \ -$"Usage: /usr/sbin/chcontext [--cap [!]] [--secure] [--xid ] [--disconnect] +$"Usage: $1 [--cap [!]] [--secure] [--xid ] [--disconnect] [--domainname ] [--hostname ] [--flag +] [--silent] [--] command arguments ... @@ -84,7 +84,7 @@ By default, a new/unused context is allocated Do not print the allocated context number. Report bugs to <$PACKAGE_BUGREPORT>." - exit $1 + exit $2 } function showVersion() @@ -114,8 +114,8 @@ OPT_INITPID= while true; do case "$1" in - --help) showHelp $0 ;; - --version) showVersion ;; + --help) showHelp $0 0;; + --version) showVersion 0;; --cap) OPT_CAPS=( "${OPT_CAPS[@]}" "$2" ); shift;; --ctx|--xid) OPT_CTX=$2; shift;; --disconnect) OPT_DISCONNECT=1;; -- 1.8.1.5