lost+found was not being removed from the list of found_vservers
[matthijs/upstream/backupninja.git] / lib / vserver.in
index 1c267c6f0acaacf4a02b02a5d32e566ff8e217b7..8ac7b7e5fa76b18f300c683b271ddbf9d211998e 100644 (file)
@@ -35,7 +35,7 @@ init_vservers() {
    getconf VSERVER /usr/sbin/vserver
    getconf VROOTDIR `if [ -x "$VSERVERINFO" ]; then $VSERVERINFO info SYSINFO | grep '^ *vserver-Rootdir' | awk '{print $2}'; fi`
    # canonicalize VROOTDIR
-   VROOTDIR=`readlink --canonicalize $VROOTDIR`
+   [ -z "$VROOTDIR" ] || VROOTDIR=`readlink --canonicalize $VROOTDIR`
    # init this library's global variables
    vservers_are_available=no
    found_vservers=
@@ -63,7 +63,7 @@ init_vservers() {
             "vservers enabled in $conffile, but VROOTDIR ($VROOTDIR) does not exist.";
             return
       fi
-      found_vservers=`ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES" | tr "\n" " "`
+      found_vservers=`ls $VROOTDIR | grep -E -v "lost\+found|ARCHIVES" | tr "\n" " "`
       if [ -z "$found_vservers" ]; then
          `if [ "$arg" = nodialog ]; then echo warning; else echo "msgBox warning"; fi` \
             "vservers enabled in $conffile, but no vserver was found in $VROOTDIR.";