Implement -D option to set configuration directory; fai.conf: don't set variables...
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 97-apt-listchanges
1 #!/bin/bash
2 # Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/97-apt-listchanges
3 # Purpose:       configure apt-listchanges
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 # Defaults:
13 #apt-listchanges apt-listchanges/confirm boolean false
14 #apt-listchanges apt-listchanges/email-address   string  root
15 #apt-listchanges apt-listchanges/which   select  news
16 #apt-listchanges apt-listchanges/frontend        select  pager
17 #apt-listchanges apt-listchanges/save-seen       boolean true
18
19 if [ -x $target/usr/bin/apt-listchanges ] ; then
20   echo 'apt-listchanges apt-listchanges/confirm boolean true' | $ROOTCMD debconf-set-selections
21   echo 'apt-listchanges apt-listchanges/which   select  both' | $ROOTCMD debconf-set-selections
22 fi
23
24 if [ -r $target/etc/apt/listchanges.conf ] ; then
25   sed -i "s/^which=news/which=both/" $target/etc/apt/listchanges.conf
26   sed -i "s/^confirm=0/confirm=1/"   $target/etc/apt/listchanges.conf
27 fi
28
29 ## END OF FILE #################################################################
30 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2