Fixed a critical bug in sys handler vservers support: it tried (and failed) to save...
authorintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Sun, 14 Aug 2005 22:54:08 +0000 (22:54 +0000)
committerintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Sun, 14 Aug 2005 22:54:08 +0000 (22:54 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@168 758a04ac-41e6-0310-8a23-8373a73cc35d

handlers/sys

index 83af9b9d8db6eb1e82e750298d1c50e1591a826d..8054b4a7ebb898b092381399235af2504b75466a 100755 (executable)
@@ -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.