1a1a3356fbbee0fa32b9b8d69aec3465b4f4da2c
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 01-packages
1 #!/bin/bash
2 # Filename:      /etc/grml/fai/config/scripts/GRMLBASE/01-packages
3 # Purpose:       check for packages that have been requested but could not be installed
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11
12 [ -r /etc/grml/grml-live.conf ]  && . /etc/grml/grml-live.conf
13 [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
14
15
16 if ! [ -r "$target/tmp/packages.list" ] ; then
17    echo "No $target/tmp/packages.list found, will not run package validation check."
18 else
19    printf "Validating package list: "
20    if $ROOTCMD dpkg --list $(grep -v '^#' $target/tmp/packages.list) >/dev/null 2>$LOGDIR/package_errors.log ; then
21       printf "done - no errors found\n"
22    else
23       printf "failed (there have been errors, find them at $LOGDIR/package_errors.log)\n"
24    fi
25 fi
26
27 ## END OF FILE #################################################################
28 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3