- if [ $vservers == yes ]; then
- [ -n "$VROOTDIR" ] || (msgBox "warning" "VROOTDIR is not set in $conffile and could not be guessed."; return)
- [ -d "$VROOTDIR" ] || (msgBox "warning" "VROOTDIR ($VROOTDIR) does not exist."; return)
- found_vservers=`ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES" | tr "\n" " "`
- [ -n "$found_vservers" ] || return
+ if [ $vservers = yes ]; then
+ if [ ! -x "$VSERVERINFO" ]; then
+ `if [ "$arg" = nodialog ]; then echo fatal; else echo "msgBox warning"; fi` \
+ "vservers enabled in $conffile, but vserver-info command was not found. Please set the VSERVERINFO configuration variable to its full path."
+ return
+ fi
+ if [ ! -x "$VSERVER" ]; then
+ `if [ "$arg" = nodialog ]; then echo fatal; else echo "msgBox warning"; fi` \
+ "vservers enabled in $conffile, but vserver command was not found. Please set the VSERVER configuration variable to its full path."
+ return
+ fi
+ if [ -z "$VROOTDIR" ]; then
+ `if [ "$arg" = nodialog ]; then echo fatal; else echo "msgBox warning"; fi` \
+ "vservers enabled in $conffile, but VROOTDIR is not set and could not be guessed."
+ return
+ fi
+ if [ ! -d "$VROOTDIR" ]; then
+ `if [ "$arg" = nodialog ]; then echo fatal; else echo "msgBox warning"; fi` \
+ "vservers enabled in $conffile, but VROOTDIR ($VROOTDIR) does not exist.";
+ return
+ fi
+ 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.";
+ return
+ fi