Fixed/improved a few bits of rdiff, dup and sys handlers.
authorintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 9 Aug 2005 20:50:05 +0000 (20:50 +0000)
committerintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 9 Aug 2005 20:50:05 +0000 (20:50 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@161 758a04ac-41e6-0310-8a23-8373a73cc35d

changelog
handlers/dup
handlers/rdiff
handlers/sys

index 96f4723debba5d81c4324e763be9823abbd82cb7..a37d6aa6e2088669d7dec5d64ed03c645b86e557 100644 (file)
--- a/changelog
+++ b/changelog
@@ -9,6 +9,13 @@ version XX -- ...
                documented .disabled method.
                corrected VROOTDIR default value.
                added ninjahelper to the install instructions.
+       improved rdiff, dup and sys handlers' vservers support
+               prevent vserver-debiantools' $VROOTDIR/ARCHIVES directory
+               to be seen as a vserver
+       changes to sys handler
+               make use of configurable $VSERVERINFO instead of hard-coded vserver-info.
+               fixed dpkg existence test inside vserver.
+               fixed $nodpkg use.
        
 version 0.7 -- July 26 2005
        added ninjahelper: a dialog based wizard for creating backupninja configs.
index 3b4d0323947d4e84775e262a6b1a189c98b95915..7dfb76698f159a4a6a1161984ec33a154186a63c 100644 (file)
@@ -39,7 +39,7 @@ if [ "$vservers" == "yes" ]; then
     [ -d "$VROOTDIR" ] || fatal "vservers enabled, but $VROOTDIR does not exist!"
     if [ "$vsnames" == "all" ]; then
        vsnames=""
-       for vserver in `ls $VROOTDIR | grep -v lost+found | grep -v ARCHIVES`; do
+       for vserver in `ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES"`; do
            vsnames="$vserver $vsnames"
        done
     else
index 7120e7a47200115eaf8358c40988eeb495368f33..10cb3c06d7523b4cf4cf219d4e64a1f9e782298d 100644 (file)
@@ -118,7 +118,7 @@ done
 # vsinclude
 if [ $usevserver ] 
 then
-       for vserver in `ls $VROOTDIR|grep -v lost+found`
+       for vserver in `ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES"`
        do
                for vi in $vsinclude
                do
index cb0856bd2b02a5eee728714247f1cd7544be835c..83af9b9d8db6eb1e82e750298d1c50e1591a826d 100755 (executable)
@@ -46,20 +46,20 @@ fi
 if [ "$packages" == "yes" ]; then
        if [ $usevserver ]
        then
-               nodpkg="lost+found"
+               nodpkg="lost+found|ARCHIVES"
                info "vserver root directory set to: $VROOTDIR"
-               for vserver in `ls $VROOTDIR |grep -v $nodpkg`
+               for vserver in `ls $VROOTDIR | grep -E -v $nodpkg`
                do
                        info "examining vserver: $vserver"
-                       running=`vserver-info $vserver RUNNING`
+                       running=`$VSERVERINFO $vserver RUNNING`
                        if [ $running = 1 ]; then
-                           if [ ! -x "`$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."
-                               nodpkg="$nodpkg $vserver"
+                               nodpkg="$nodpkg|$vserver"
                            fi
                        else
                            warning "vserver $vserver is not running, skipping installed packages report."
-                           nodpkg="$nodpkg $vserver"
+                           nodpkg="$nodpkg|$vserver"
                        fi
 
                done
@@ -97,7 +97,7 @@ fi
 
 if [ $usevserver ]
 then
-       for vserver in `ls $VROOTDIR | grep -v $nodpkg | grep -v lost+found`
+       for vserver in `ls $VROOTDIR | grep -E -v $nodpkg`
        do
                debug "$VSERVER $vserver exec dpkg --get-selections > $VROOTDIR/$vserver$packagesfile"
                $VSERVER $vserver exec dpkg --get-selections > $VROOTDIR/$vserver$packagesfile