if $ROOTCMD dpkg --list $(grep -v '^#' $target/tmp/packages.list) >/dev/null 2>$LOGDIR/package_errors.log ; then
printf "done - no errors found\n"
else
if $ROOTCMD dpkg --list $(grep -v '^#' $target/tmp/packages.list) >/dev/null 2>$LOGDIR/package_errors.log ; then
printf "done - no errors found\n"
else