X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvmount;h=c9dde07c4c4bfe97407f82703c7b9e8b3fc3de7f;hb=b86560b87e73f011c96a303dcaca640eea1f2551;hp=f0a63d5cd9afc9055b4ba7559ffbc7627c3b01c6;hpb=d96dd6f68e706e954c5e6d2afe8d66fb4586bd53;p=util-vserver.git diff --git a/scripts/vmount b/scripts/vmount index f0a63d5..c9dde07 100755 --- a/scripts/vmount +++ b/scripts/vmount @@ -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" ) @@ -68,7 +69,7 @@ tmp=$(getopt -o +o:t:an --long help,version,debug,bind,rbind,move -n "$0" -- "$@ eval set -- "$tmp" declare -a options - +fstype="" while true; do case "$1" in (--help) showHelp $0 ;; @@ -78,6 +79,7 @@ while true; do options=( "${options[@]}" "$1" ) ;; (-t|-o) options=( "${options[@]}" "$1" "$2" ) + test "$1" != "-t" || fstype="$1" shift ;; (--) shift; break;; @@ -88,7 +90,7 @@ done case "x$1" in (x/*|x) ;; - (*) panic $"vmount: the source must be an absolute path";; + (*) test "$fstype" = "nfs" || panic $"vmount: the source must be an absolute path";; esac rc=0