aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-08-14 22:54:08 +0000
committerintrigeri <intrigeri@boum.org>2005-08-14 22:54:08 +0000
commit88d1f719c580ded553e95cbc125a65bf9362e5a4 (patch)
treee97c66b6bc5180d0714f0ae9f452d04563b3a07b /handlers
parent3d3c5aa3df15af6b97633c068747e2adc6fe3a81 (diff)
downloadbackupninja-88d1f719c580ded553e95cbc125a65bf9362e5a4.tar.gz
backupninja-88d1f719c580ded553e95cbc125a65bf9362e5a4.tar.bz2
Fixed a critical bug in sys handler vservers support: it tried (and failed) to save packages list even if packages=no.
Diffstat (limited to 'handlers')
-rwxr-xr-xhandlers/sys27
1 files changed, 14 insertions, 13 deletions
diff --git a/handlers/sys b/handlers/sys
index 83af9b9..8054b4a 100755
--- a/handlers/sys
+++ b/handlers/sys
@@ -95,22 +95,23 @@ fi
# here we grab a list of the packages installed and removed.
#
-if [ $usevserver ]
-then
- 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
- done
-fi
-
-# We want to perform this on the host as well
if [ "$packages" == "yes" ]; then
- debug "dpkg --get-selections > $packagesfile"
- dpkg --get-selections > $packagesfile
+ if [ $usevserver ]
+ then
+ 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
+ done
+ fi
+
+# We want to perform this on the host as well
+ if [ "$packages" == "yes" ]; then
+ debug "dpkg --get-selections > $packagesfile"
+ dpkg --get-selections > $packagesfile
+ fi
fi
-
## PARTITIONS #############################
# here we use sfdisk to dump a listing of all the partitions.