X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvmount;h=1e40f85456bda7e92ce8764af057608b67aa7a74;hb=8a3f3a69bb09b7b9bf63dd623c4993b02cfe021f;hp=0afe144739849ad5cb76286846e39056defdaf4b;hpb=fa0c3b8e1196700ca7ff9f9adcb43df3df7f40cb;p=util-vserver.git diff --git a/scripts/vmount b/scripts/vmount index 0afe144..1e40f85 100755 --- a/scripts/vmount +++ b/scripts/vmount @@ -30,7 +30,7 @@ function showHelp() echo \ $"Usage: $0 -- [-o options] [--bind|--rbind] [-t ] [-a] [-n] [--move] - + [ []] ... what to mount, this is relative to the host's root ... where to mount it, this is relative to the guest's root @@ -53,9 +53,10 @@ the GNU General Public License. This program has absolutely no warranty." declare -a guests -while true; do +while test $# -gt 0; do case "$1" in (--) shift; break;; + (-*) break;; (*) _setVserverDir "$1" guests=( "${guests[@]}" "$VSERVER_DIR" ) @@ -86,15 +87,15 @@ while true; do shift done -case "$1" in - (/*) ;; +case "x$1" in + (x/*|x) ;; (*) panic $"vmount: the source must be an absolute path";; esac rc=0 for guest in "${guests[@]}"; do pushd "$guest/vdir" &> /dev/null - $_VNAMESPACE -e "$guest" -- \ + callInNamespace "$guest" \ $_SECURE_MOUNT --chroot --fstab "$guest/fstab" "${options[@]}" "$@" test "$?" -eq 0 || rc=$? popd &> /dev/null