X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fchcontext;h=93b09593bc3d7c47366ec22a04a590e54d018451;hb=08cf141b4557892740d357c523fe8ed74be39bcb;hp=9fa67cda3ac447c412ae9cf0e86ffe4a57a0e621;hpb=9c78378bebc1a9f3d400f422df8ede9efea57dea;p=util-vserver.git diff --git a/scripts/chcontext b/scripts/chcontext index 9fa67cd..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;; @@ -153,9 +153,9 @@ test -z "$OPT_DOMAINNAME$OPT_HOSTNAME" || \ chain_cmd=( "${chain_cmd[@]}" -- $_VATTRIBUTE --set + ${OPT_SECURE:+--secure} ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} - ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} - ${OPT_SECURE:+--secure} ) + ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) migrate_cmd=( $_VCONTEXT ${OPT_SILENT:+--silent}