Skip to content
Snippets Groups Projects
Commit 921babdf authored by intrigeri's avatar intrigeri
Browse files

mysql,pgsql,svn,sys: fixed failing "is vserver running" test

parent d5c8686e
Branches
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ then ...@@ -57,7 +57,7 @@ then
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'" [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
# is it running ? # is it running ?
running=`$VSERVERINFO $vsname RUNNING` running=`$VSERVERINFO $vsname RUNNING`
[ $running = 1 ] || fatal "vserver $vsname is not running." [ "$running" = "1" ] || fatal "vserver $vsname is not running."
fi fi
# create backup dirs, the vroot variable will be empty if no vsname was specified # create backup dirs, the vroot variable will be empty if no vsname was specified
......
...@@ -30,7 +30,7 @@ if [ $usevserver ]; then ...@@ -30,7 +30,7 @@ if [ $usevserver ]; then
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'" [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
# is it running ? # is it running ?
running=`$VSERVERINFO $vsname RUNNING` running=`$VSERVERINFO $vsname RUNNING`
if [ $running = 1 ]; then if [ "$running" = "1" ]; then
if [ "$databases" == "all" ]; then if [ "$databases" == "all" ]; then
[ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMPALL`" ] || \ [ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMPALL`" ] || \
fatal "Can't find $PGSQLDUMPALL in vserver $vsname." fatal "Can't find $PGSQLDUMPALL in vserver $vsname."
......
...@@ -32,7 +32,7 @@ then ...@@ -32,7 +32,7 @@ then
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'" [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
# is it running ? # is it running ?
running=`$VSERVERINFO $vsname RUNNING` running=`$VSERVERINFO $vsname RUNNING`
[ $running = 1 ] || fatal "vserver $vsname is not running." [ "$running" = "1" ] || fatal "vserver $vsname is not running."
fi fi
cd $vroot$src cd $vroot$src
......
...@@ -52,7 +52,7 @@ if [ "$packages" == "yes" ]; then ...@@ -52,7 +52,7 @@ if [ "$packages" == "yes" ]; then
do do
info "examining vserver: $vserver" info "examining vserver: $vserver"
running=`$VSERVERINFO $vserver RUNNING` running=`$VSERVERINFO $vserver RUNNING`
if [ $running = 1 ]; then if [ "$running" = "1" ]; then
if [ ! -x "$VROOTDIR/$vserver`$VSERVER $vserver exec which dpkg`" ]; then if [ ! -x "$VROOTDIR/$vserver`$VSERVER $vserver exec which dpkg`" ]; then
warning "can't find dpkg in vserver $vserver, skipping installed packages report." warning "can't find dpkg in vserver $vserver, skipping installed packages report."
nodpkg="$nodpkg|$vserver" nodpkg="$nodpkg|$vserver"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment