aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-08-09 20:50:05 +0000
committerintrigeri <intrigeri@boum.org>2005-08-09 20:50:05 +0000
commit4e0c31d01627b9c01ff09841e1061f42750997f6 (patch)
treeea9b60d765aac2faa9d6ae59943168086e7e6f32 /handlers
parentf22dbec1dcad37d85b6ee8b556dc999c542bc3c0 (diff)
downloadbackupninja-4e0c31d01627b9c01ff09841e1061f42750997f6.tar.gz
backupninja-4e0c31d01627b9c01ff09841e1061f42750997f6.tar.bz2
Fixed/improved a few bits of rdiff, dup and sys handlers.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/dup2
-rw-r--r--handlers/rdiff2
-rwxr-xr-xhandlers/sys14
3 files changed, 9 insertions, 9 deletions
diff --git a/handlers/dup b/handlers/dup
index 3b4d032..7dfb766 100644
--- a/handlers/dup
+++ b/handlers/dup
@@ -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
diff --git a/handlers/rdiff b/handlers/rdiff
index 7120e7a..10cb3c0 100644
--- a/handlers/rdiff
+++ b/handlers/rdiff
@@ -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
diff --git a/handlers/sys b/handlers/sys
index cb0856b..83af9b9 100755
--- a/handlers/sys
+++ b/handlers/sys
@@ -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