sys: fixed debconf-get-selections search in VServers, especially in case it is not...
authorintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Wed, 25 Jun 2008 09:00:04 +0000 (09:00 +0000)
committerintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Wed, 25 Jun 2008 09:00:04 +0000 (09:00 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@584 758a04ac-41e6-0310-8a23-8373a73cc35d

handlers/sys.in

index a029af6762a66b4f321e037c9b9f2c1951452eda..cc8ed095931fcaa6de46113ccd6ccd7caf1e0a1b 100755 (executable)
@@ -126,11 +126,11 @@ if [ "$packages" == "yes" ]; then
             set +o noglob
          fi
          # is $debconfgetselections available inside $vserver ?
             set +o noglob
          fi
          # is $debconfgetselections available inside $vserver ?
-         if [ ! -x "$VROOTDIR/$vserver`$VSERVER $vserver exec which $debconfgetselections`" ]; then
-            warning "can't find $debconfgetselections in vserver $vserver, skipping package selection states."
+         if [ -z "`$VSERVER $vserver exec which debconf-get-selections`" ]; then
+            warning "can't find debconf-get-selections in vserver $vserver, skipping package selection states."
          else
             debug "$VSERVER $vserver exec $debconfgetselections > $VROOTDIR/$vserver$selectionsfile"
          else
             debug "$VSERVER $vserver exec $debconfgetselections > $VROOTDIR/$vserver$selectionsfile"
-            $VSERVER $vserver exec $debconfgetselections > $VROOTDIR/$vserver$selectionsfile || fatal "can not save $debconfgetselections info to $selectionsfile"
+            $VSERVER $vserver exec $debconfgetselections > $VROOTDIR/$vserver$selectionsfile || fatal "can not save debconf-get-selections info to $selectionsfile"
          fi
       done
    fi
          fi
       done
    fi