Adjust 95-package-information for new log layout
authorMichael Prokop <devnull@localhost>
Sun, 25 Nov 2007 15:49:09 +0000 (16:49 +0100)
committerMichael Prokop <devnull@localhost>
Sun, 25 Nov 2007 15:49:09 +0000 (16:49 +0100)
etc/grml/fai/config/hooks/instsoft.GRMLBASE
etc/grml/fai/config/scripts/GRMLBASE/95-package-information

index 7222028..1580f38 100755 (executable)
@@ -64,16 +64,16 @@ EOF
    fi
 
    # FAI softupdate does not execute upgrade, so let's do it on our own:
-   $ROOTCMD apt-get update
-   if [ -x $target/usr/bin/aptitude ] ; then
-      if strings $target/usr/bin/aptitude | grep safe-upgrade 1>/dev/null ; then
-         $ROOTCMD aptitude -y safe-upgrade
-      else
-         $ROOTCMD aptitude -y upgrade
-      fi
-   else
-      $ROOTCMD apt-get -y upgrade
-   fi
+#   $ROOTCMD apt-get update
+#   if [ -x $target/usr/bin/aptitude ] ; then
+#      if strings $target/usr/bin/aptitude | grep safe-upgrade 1>/dev/null ; then
+#         $ROOTCMD aptitude -y safe-upgrade
+#      else
+#         $ROOTCMD aptitude -y upgrade
+#      fi
+#   else
+#      $ROOTCMD apt-get -y upgrade
+#   fi
 
 else # no softupdate but fresh installation
 
index 2cce18e..e6d82f8 100755 (executable)
@@ -11,12 +11,17 @@ HOSTNAME=''
 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
 [ -n "$HOSTNAME" ] || HOSTNAME=grml
 
+if ! [ -d /var/log/fai/"$HOSTNAME"/last/ ] ; then
+   echo "Error: /var/log/fai/"$HOSTNAME"/last/ not available. Exiting.">&2
+   exit 1
+fi
+
 if [ -x $target/usr/bin/dpkg-query ] ; then
    $ROOTCMD dpkg-query -W --showformat='${Package}\t${Installed-Size;10}\n' > \
-   /var/log/fai/dirinstall/$HOSTNAME/packages.size
+   /var/log/fai/$HOSTNAME/last/packages.size
 fi
 
-COLUMNS=200 $ROOTCMD dpkg --list > /var/log/fai/dirinstall/$HOSTNAME/dpkg.list
-COLUMNS=200 $ROOTCMD dpkg --get-selections > /var/log/fai/dirinstall/$HOSTNAME/dpkg.selections
+COLUMNS=200 $ROOTCMD dpkg --list > /var/log/fai/$HOSTNAME/last/dpkg.list
+COLUMNS=200 $ROOTCMD dpkg --get-selections > /var/log/fai/$HOSTNAME/last/dpkg.selections
 
 ## END OF FILE #################################################################