summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2010-09-04 19:52:12 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2010-09-04 19:52:12 +0200
commit158bfd1a3f593e208ad2208ca1be236cb6f25a55 (patch)
tree0f2f7b6de7e28c2c74da3036e662accfd3018443 /config
parenta2905105a3c3324686ed565ec833b5cca609fdd3 (diff)
downloadkanotix-158bfd1a3f593e208ad2208ca1be236cb6f25a55.zip
kanotix-158bfd1a3f593e208ad2208ca1be236cb6f25a55.tar.gz
added debconf-set-selections hook
Diffstat (limited to 'config')
-rwxr-xr-xconfig/chroot_local-hooks/debconf-selections19
1 files changed, 19 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/debconf-selections b/config/chroot_local-hooks/debconf-selections
new file mode 100755
index 0000000..fc7ac8f
--- /dev/null
+++ b/config/chroot_local-hooks/debconf-selections
@@ -0,0 +1,19 @@
+#!/bin/bash
+# set various debconf values and "enable" them using dpkg-reconfigure
+#
+# this hook is necessary because the values of chroot_local-preseed get overwritten
+# with the templates (= default values) when dpkg installs the packages
+# (note: chroot_local-preseed is executed before chroot_install-packages)
+
+cat <<eof >/root/debconf.tmp
+keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true
+pbuilder pbuilder/mirrorsite string http://cdn.debian.net/debian
+eof
+
+debconf-set-selections /root/debconf.tmp
+for package in $(awk '{print $1}' /root/debconf.tmp | sort -u | grep .)
+do
+ [ "$(dpkg-query -W --showformat='${Version}' "$package")" ] && dpkg-reconfigure -fnoninteractive --no-reload "$package"
+done
+rm -f /root/debconf.tmp
+