Add new scripts for retreiving bugs via apt-listbugs and storing package selection
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 96-apt-listbugs
1 #!/bin/sh
2 # Filename:      /etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
3 # Purpose:       retreive list of bugreports of installed packages inside chroot
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 # Latest change: Sat Oct 13 18:03:15 CEST 2007 [mika]
8 ################################################################################
9
10 HOSTNAME=''
11 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
12 [ -n "$HOSTNAME" ] || HOSTNAME=grml
13
14 if [ -x $target/usr/sbin/apt-listbugs ] ; then
15    for severity in critical grave serious ; do
16        apt-listbugs -s $severity list $(apt-show-source | \
17        grep -v -e 'not installed' -e '--------------' -e 'Version' | \
18        awk '{print $4;}' | grep -v '^[() ]*$'| sort | uniq) \
19        /var/log/fai/dirinstall/$HOSTNAME/bugs.${severity}
20    done
21 fi
22
23 ## END OF FILE #################################################################