From: Michael Prokop Date: Sun, 25 Nov 2007 15:49:09 +0000 (+0100) Subject: Adjust 95-package-information for new log layout X-Git-Tag: 0.0.10~15 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=68b9fb146e8702b2f6a790e3d9486ca36f0d9f76 Adjust 95-package-information for new log layout --- diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 7222028..1580f38 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -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 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/95-package-information b/etc/grml/fai/config/scripts/GRMLBASE/95-package-information index 2cce18e..e6d82f8 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/95-package-information +++ b/etc/grml/fai/config/scripts/GRMLBASE/95-package-information @@ -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 #################################################################