- if [ ! -x "`which dpkg`" ]; then
- warning "can't find dpkg, skipping installed packages report."
- packages="no"
+ if [ $usevserver ]
+ then
+ nodpkg="lost+found|ARCHIVES"
+ info "vserver root directory set to: $VROOTDIR"
+ for vserver in `ls $VROOTDIR | grep -E -v $nodpkg`
+ do
+ info "examining vserver: $vserver"
+ running=`$VSERVERINFO $vserver RUNNING`
+ if [ $running = 1 ]; 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"
+ fi
+ else
+ warning "vserver $vserver is not running, skipping installed packages report."
+ nodpkg="$nodpkg|$vserver"
+ fi
+
+ done
+ else
+ if [ ! -x "`which dpkg`" ]; then
+ warning "can't find dpkg, skipping installed packages report."
+ packages="no"
+ fi