getconf packagesfile $parentdir/dpkg-selections.txt
getconf packagemgr `which dpkg`
getconf packagemgroptions ' --get-selections *'
getconf packagesfile $parentdir/dpkg-selections.txt
getconf packagemgr `which dpkg`
getconf packagemgroptions ' --get-selections *'
- getconf selectionsfile $parentir/debconfsel.txt
- getconf debconfgetselections `debconf-get-selections`
+ getconf selectionsfile $parentdir/debconfsel.txt
+ getconf debconfgetselections `which debconf-get-selections`
- 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 "$debconfgetselections > $selectionsfile"
$debconfgetselections > $selectionsfile || fatal "can not save $debconfgetselections info to $selectionsfile"
else
debug "$debconfgetselections > $selectionsfile"
$debconfgetselections > $selectionsfile || fatal "can not save $debconfgetselections info to $selectionsfile"
- echo $HASHES >> $sysreportfile
- echo "# $STATUS" >> $sysreportfile
- echo $HASHES >> $sysreportfile
- $1 >> $sysreportfile 2>&1 || info "executing of $1 failed"
+ if [ -x $1 ]; then
+ echo $HASHES >> $sysreportfile
+ echo "# $STATUS" >> $sysreportfile
+ echo $HASHES >> $sysreportfile
+ $* >> $sysreportfile 2>&1 || info "executing of $1 failed"
+ fi
if [ -f /etc/lilo.conf ]; then
STATUS="Collecting information about the boot process (lilo):"
catiffile "/etc/lilo.conf"
if [ -f /etc/lilo.conf ]; then
STATUS="Collecting information about the boot process (lilo):"
catiffile "/etc/lilo.conf"
fi
if [ -d /boot/grub -a -f /boot/grub/grub.conf -a -f /boot/grub/device.map ]; then
STATUS="Collecting information about the boot process (grub.conf):"
fi
if [ -d /boot/grub -a -f /boot/grub/grub.conf -a -f /boot/grub/device.map ]; then
STATUS="Collecting information about the boot process (grub.conf):"
for x in $(/sbin/lsmod | /bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null
) ; do
STATUS="Checking module information $x:"
for x in $(/sbin/lsmod | /bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null
) ; do
STATUS="Checking module information $x:"