Fix the trailing slash problem.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 9 Jul 2009 18:40:48 +0000 (18:40 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 9 Jul 2009 18:40:48 +0000 (18:40 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2842 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/vserver

index a34993f..8b7e8cb 100755 (executable)
@@ -166,12 +166,13 @@ test "$cmd" != build || { shift 2; exec $_VNAMESPACE --new -- \
 allow_legacy=
 
 case "$vserver" in
-    (./*) VSERVER_DIR=`pwd`/$vserver;;
-    (/*)  VSERVER_DIR=$vserver;;
-    (*)          VSERVER_DIR=$__CONFDIR/$vserver
+    (./*) VSERVER_DIR="`pwd`/$vserver";;
+    (/*)  VSERVER_DIR="$vserver";;
+    (*)          VSERVER_DIR="$__CONFDIR/$vserver"
          allow_legacy=1
          ;;
 esac
+VSERVER_DIR="${VSERVER_DIR%%/}"
 
 if test -n "$allow_legacy"; then
     do_legacy=