From d0f2b1c1669661a87d5e69367c4248cabd224e2e Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 19 Jan 2006 21:58:29 +0000 Subject: [PATCH] handlers/sys: start to use new lib/vserver functionality git-svn-id: http://code.autistici.org/svn/backupninja/trunk@337 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 3 ++- handlers/sys | 18 +++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac55b63..c39ca97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,8 @@ version 0.9.3 -- unreleased code refactor: . now uses vservers lib to initialize vservers support handler changes - duplicity, mysql, pgsql, rdiff, svn: use new lib/vserver functionality + duplicity, mysql, pgsql, rdiff, svn, sys: start to use (at different + degrees) new lib/vserver functionality mysql: . fixed no user defaults file processing duplicity: diff --git a/handlers/sys b/handlers/sys index dd49a3e..349f284 100755 --- a/handlers/sys +++ b/handlers/sys @@ -33,23 +33,19 @@ getconf sfdisk_options "" getconf hwinfo_options "" # See if vservers are configured -if [ "$vservers" = "yes" ] +local usevserver=no +if [ $vservers_are_available = yes ] then - if [ ! -d $VROOTDIR ] - then - fatal "vservers enabled, but $VROOTDIR does not exist!" - else - info "vserver method enabled" - usevserver=1 - fi + info "vserver method enabled" + usevserver=yes fi if [ "$packages" == "yes" ]; then - if [ $usevserver ] + if [ $usevserver = yes ] then nodpkg="lost+found|ARCHIVES" info "vserver root directory set to: $VROOTDIR" - for vserver in `ls $VROOTDIR | grep -E -v $nodpkg` + for vserver in $found_vservers do info "examining vserver: $vserver" running=`$VSERVERINFO $vserver RUNNING` @@ -97,7 +93,7 @@ fi # if [ "$packages" == "yes" ]; then - if [ $usevserver ] + if [ $usevserver = yes ] then for vserver in `ls $VROOTDIR | grep -E -v $nodpkg` do -- 2.30.2