- if [ ! -x "$VROOTDIR/$vserver`$VSERVER $vserver exec which $debconfgetselections`" ]; then
- warning "can't find $debconfgetselections in vserver $vserver, skipping package selection states."
+ found=no
+ # case #1: it is available on the host, is it available inside $vserver ?
+ if [ -n "$debconfgetselections" ]; then
+ [ -x "${VROOTDIR}/${vserver}${debconfgetselections}" ] && found=yes
+ # case #2: it is not available on the host, is it available inside $vserver ?
+ else
+ [ -n "`$VSERVER $vserver exec which debconf-get-selections`" ] && found=yes
+ fi
+ if [ "$found" != yes ]; then
+ warning "can't find debconf-get-selections in vserver $vserver, skipping package selection states."