Update for release 0.9.34.
[grml-live.git] / grml-live
index 5a4b473..39f49f9 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -288,7 +288,7 @@ ISO_OUTPUT="$OUTPUT/grml_isos"
 [ -n "$RELEASENAME" ] && export RELEASENAME="$RELEASENAME"
 # }}}
 
-# ZERO_LOGFILE - check for backwards compability reasons {{{
+# ZERO_LOGFILE - check for backwards compatibility reasons {{{
 # this was default behaviour until grml-live 0.9.34:
 if [ -n "$ZERO_LOGFILE" ] ; then
    PRESERVE_LOGFILE='' # make sure it's cleaned then
@@ -898,7 +898,7 @@ else
          bailout
       fi
    else # no $SQUASHFS_BINARY configured, let's find the according binary:
-      # Note: this is ALL for backward compability and yes: it's serious PITA.
+      # Note: this is ALL for backward compatibility and yes: it's serious PITA.
       # We'll definitely drop this once people build >2.6.28-grml* only and
       # the squashfs-tools vs. squashfs-lzma-tools + zlib vs. lzma situation
       # is settling...
@@ -913,7 +913,7 @@ else
          else # neither -nolzma nor -z and mksquashfs-lzma is available:
             SQUASHFS_BINARY='mksquashfs-lzma'
 
-            # backwards compability: someone has squashfs-lzma-tools >=4 installed but
+            # backwards compatibility: someone has squashfs-lzma-tools >=4 installed but
             # 1) doesn't use -nolzma in $SQUASHFS_OPTIONS or the grml-live's -z option *and*
             # 2) builds against kernel version <=2.6.28-grml[64]
             if ls $CHROOT_OUTPUT/boot/vmlinuz* >/dev/null 2>&1 ; then
@@ -1142,9 +1142,10 @@ if [ -d /usr/share/grml-live-db ] ; then
   DPKG_LIST="/var/log/fai/$HOSTNAME/last/dpkg.list" # the dpkg --list output of the chroot:
   [ -n "$DPKG_DATABASE" ]  || DPKG_DATABASE=/var/log/grml-live.db
   [ -n "$DPKG_DBSCRIPT" ]  || DPKG_DBSCRIPT=/usr/share/grml-live-db/scripts/dpkg-to-db
-  [ -n "$DPKG_DBOPTIONS" ] || DPKG_DBOPTIONS="-d $DPKG_DATABASE --logfile $LOGFILE --flavour $GRML_NAME < $DPKG_LIST"
+  [ -n "$DPKG_DBOPTIONS" ] || DPKG_DBOPTIONS="--database $DPKG_DATABASE --logfile $LOGFILE --flavour $GRML_NAME --dpkg $DPKG_LIST"
 
   if ! [ -x "$DPKG_DBSCRIPT" ] ; then
+    log "Error: $DPKG_DBSCRIPT is not executable, can not log dpkg information."
     eerror "Error: $DPKG_DBSCRIPT is not executable, can not log dpkg information." ; eend 1
     bailout 14
   fi
@@ -1156,10 +1157,13 @@ if [ -d /usr/share/grml-live-db ] ; then
   #fi
 
   if ! [ -r "$DPKG_LIST" ] ; then
+     log "Error reading $DPKG_LIST - can not provide information to $DPKG_DBSCRIPT"
      eerror "Error reading $DPKG_LIST - can not provide information to $DPKG_DBSCRIPT" ; eend 1
      bailout 14
   else
      einfo "Logging $DPKG_LIST to database $DPKG_DATABASE"
+     log "Logging $DPKG_LIST to database $DPKG_DATABASE"
+     log "Executing $DPKG_DBSCRIPT $DPKG_DBOPTIONS"
      eindent
 
      if DB_INFO=$("$DPKG_DBSCRIPT" $DPKG_DBOPTIONS 2>&1) ; then