From ea83b608ae7b5894876bd5a98f49b9effaca4127 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 24 Jun 2008 15:55:10 +0000 Subject: [PATCH] pgsql, mysql, svn: use new vservers_running function from lib/vserver (factorization++) git-svn-id: http://code.autistici.org/svn/backupninja/trunk@575 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 2 ++ handlers/mysql.in | 5 +---- handlers/pgsql.in | 5 +---- handlers/svn.in | 5 +---- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7c2a77..09c4747 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,8 @@ version 0.9.6 -- unreleased . make deleted maildirs record the date they were deleted . add destid_file configuration option to enable you to specify an alternate ssh public key authentication file (defaulting to /root/.ssh/id_rsa) + pgsql, mysql, svn: + . use new vservers_running function from lib/vserver (factorization++) sys: . update for 2.6 kernels: use /proc/kallsyms instead of /proc/ksyms (Closes: Trac#39) diff --git a/handlers/mysql.in b/handlers/mysql.in index defb72a..fe1e783 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -31,10 +31,7 @@ if [ $vservers_are_available = yes ]; then fatal "The vserver given in vsname ($vsname) does not exist." fi # is it running ? - $VSERVERINFO -q $vsname RUNNING - if [ $? -ne 0 ]; then - fatal "The vserver $vsname is not running." - fi + vservers_running $vsname || fatal "The vserver $vsname is not running." # everything ok info "Using vserver '$vsname'." usevserver=yes diff --git a/handlers/pgsql.in b/handlers/pgsql.in index 1b4a452..f334bf2 100644 --- a/handlers/pgsql.in +++ b/handlers/pgsql.in @@ -21,10 +21,7 @@ if [ $vservers_are_available = yes ]; then fatal "The vserver given in vsname ($vsname) does not exist." fi # is it running ? - $VSERVERINFO -q $vsname RUNNING - if [ $? -ne 0 ]; then - fatal "The vserver $vsname is not running." - fi + vservers_running $vsname || fatal "The vserver $vsname is not running." # everything ok info "Using vserver '$vsname'." usevserver=yes diff --git a/handlers/svn.in b/handlers/svn.in index 377d71c..d19b0b8 100644 --- a/handlers/svn.in +++ b/handlers/svn.in @@ -22,10 +22,7 @@ if [ $vservers_are_available = yes ]; then fatal "The vserver given in vsname ($vsname) does not exist." fi # is it running ? - $VSERVERINFO -q $vsname RUNNING - if [ $? -ne 0 ]; then - fatal "The vserver $vsname is not running." - fi + vservers_running $vsname || fatal "The vserver $vsname is not running." # everything ok info "Using vserver '$vsname'." usevserver=yes -- 2.30.2