- if [ ! -x "`which dpkg`" ]; then
- debug 2 "can't find dpkg, skipping installed packages report."
- packages="no"
+ if [ $usevserver ]
+ then
+ for vserver in `ls $VROOTDIR |grep -v lost+found`
+ do
+ running=`vserver-info $vserver RUNNING`
+ if [ $running = 1]; then
+ if [ ! -x "`$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