gentoo: use /var/run for new /run compatibility
[util-vserver.git] / scripts / vupdateworld
index 0ce3e5a..ebc5edf 100755 (executable)
@@ -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,9 +57,8 @@ 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" );;
-       (--)            shift; break;;
-       (*)             echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;;
+       (--)            test ${#vsomething_opts[@]} -eq 0 && shift; break;;
+       (*)             vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
     esac
     shift
 done
@@ -74,10 +73,8 @@ while [ $# -gt 0 ]; do
     shift
 done
 
-VSOMETHING_TITLE=vemerge
+VSOMETHING_TITLE=vupdateworld
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
-test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
 exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- world --update --deep --newuse "$@"