From 96023985bce5fc3186487a08efe1e3b665574ced Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 19 Jan 2006 21:56:44 +0000 Subject: [PATCH] lib/vserver.in[init_vservers]: warn if vservers are enabled but no vserver is found --- ChangeLog | 1 + lib/vserver.in | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b8ca3c2..2e844ad 100644 --- 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. diff --git a/lib/vserver.in b/lib/vserver.in index 3030387..bb1a152 100644 --- a/lib/vserver.in +++ b/lib/vserver.in @@ -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 } -- 2.30.2