lib/vserver.in[init_vservers]: warn if vservers are enabled but no vserver is found
authorintrigeri <intrigeri@boum.org>
Thu, 19 Jan 2006 21:56:44 +0000 (21:56 +0000)
committerintrigeri <intrigeri@boum.org>
Thu, 19 Jan 2006 21:56:44 +0000 (21:56 +0000)
ChangeLog
lib/vserver.in

index b8ca3c2b1e897f619800695299050e3ae144c493..2e844ada95eaaf604cf06c417b0f84ac7f47d21c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@ version 0.9.3 -- unreleased
         . init_vservers: test in a stricter way the real vservers availability
         . init_vservers: canonicalize VROOTDIR (since duplicity et al.
           don't follow symlinks)
+        . init_vservers: warn if vservers are enabled but no vserver is found
     known bugs:
         easydialog: 
          . formDisplay does not return exit status.
index 3030387a00aa1cca5a4b3272f14b923610bfb84a..bb1a1528334e80bdd7a181b522912648717950c7 100644 (file)
@@ -64,7 +64,11 @@ init_vservers() {
             return
       fi
       found_vservers=`ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES" | tr "\n" " "`
-      [ -n "$found_vservers" ] || return
+      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.";      
+            return
+      fi
       vservers_are_available=yes
    fi
 }