From 0e8c35b5c58232a98f4ac2a8f6a8e2b6dda5e8e6 Mon Sep 17 00:00:00 2001
From: Micah Anderson <micah@riseup.net>
Date: Tue, 27 Dec 2005 17:04:33 +0000
Subject: [PATCH]  r208@um:  micah | 2005-12-26 22:43:36 -0500  Fixed mysql
 check to see if vserver is running

---
 ChangeLog      | 1 +
 handlers/mysql | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 860a0a22..d8b57c66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 version 0.9.2 -- unreleased 
+	fixed mysql check to see if vserver is running
 	fixed duplicity globbing support in include and exclude options 
 	trac handler mkdir subdirectory problem fixed
 	fixed broken toint() causing backups not to run when set to "everyday"
diff --git a/handlers/mysql b/handlers/mysql
index 8d59fa4b..55bfb25b 100644
--- a/handlers/mysql
+++ b/handlers/mysql
@@ -56,8 +56,11 @@ then
 	vroot="$VROOTDIR/$vsname"
 	[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
 	# is it running ?
-	running=`$VSERVERINFO $vsname RUNNING`
-	[ "$running" = "1" ] || fatal "vserver $vsname is not running."
+	$VSERVERINFO $vsname RUNNING
+	if [ $? -ne 0 ]
+	then
+		fatal "vserver $vsname is not running."
+	fi
 fi
 	
 # create backup dirs, the vroot variable will be empty if no vsname was specified
-- 
GitLab