X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvdispatch-conf;h=084c687f394e93dd169011da70166e2b388d4111;hb=710b574e268ecfa9705ac7c73332362da9563fbd;hp=d1da3897b02b3c84e603a68f9b4c8193aaa1f873;hpb=f848833a2cdd09d5e4e5d94b5ddf67cf271dd980;p=util-vserver.git diff --git a/scripts/vdispatch-conf b/scripts/vdispatch-conf index d1da389..084c687 100755 --- a/scripts/vdispatch-conf +++ b/scripts/vdispatch-conf @@ -46,7 +46,7 @@ the GNU General Public License. This program has absolutely no warranty." exit 0 } -tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 +tmp=$(getopt -o +q --long help,version,debug,quiet,$VS_ALLVSERVERS_ARGS -n "$0" -- "$@") || exit 1 eval set -- "$tmp" declare -a send_through vsomething_opts @@ -57,16 +57,24 @@ while true; do (--version) showVersion ;; (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; - (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; + (--) test ${#vsomething_opts[@]} -eq 0 && shift; break;; + (*) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; + esac + shift +done + +declare -a vserver_names + +while [ $# -gt 0 ]; do + case "$1" in (--) shift; break;; - (*) echo $"vdispatch-conf: internal error; arg=='$1'" >&2; exit 1;; + (*) vserver_names=( "${vserver_names[@]}" "$1" );; esac shift done -VSOMETHING_TITLE=vemerge +VSOMETHING_TITLE=vdispatch-conf VSOMETHING_PKGMGMT=1 export VSOMETHING_TITLE VSOMETHING_PKGMGMT - -exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" "$@" +exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" "${vserver_names[@]}" -- "$@"