3 # https://lists.uni-koeln.de/pipermail/linux-fai/2016-July/011398.html
4 # In Ubuntu 16.04 (but not 14.04), the locales configuration mechanism has
5 # changed. There is a /var/lib/dpkg/info/locales.config file, which
6 # overrides /var/lib/dpkg/info/locales.postinst and consults
7 # /var/lib/locales/supported.d/local instead of the debconf system. (See
8 # the code in /usr/share/debconf/frontend that prefers locales.config.) This
9 # hook applies the debconf setting. It must run after FAI's debconf task
10 # but before dpkg gets a chance to clobber debconf with an empty setting.
12 # todo: debconf-get-selections did not show our locale settings.
14 # this could be related in the fai.log
17 # Adding debconf data from /var/lib/fai/config/debconf/DEBIAN
18 # Reconfiguring package keyboard-configuration
19 # Your console font configuration will be updated the next time your system
20 # boots. If you want to update it now, run 'setupcon' from a virtual console.
21 # debconf: DbDriver "_ENV_stack": unable to save changes to: console-setup/ask_detect keyboard-configuration/model keyboard-configuration/model keyboard-configuration/modelcode keyboard-configuration/variant keyboard-configuration/variant keyboard-configuration/optionscode keyboard-configuration/store_defaults_in_debconf_db
23 # todo fix the dropbear cat not found issue.
26 if [ ! -f "$target/var/lib/locales/supported.d/local" ]; then
27 if $ROOTCMD debconf
--owner=locales sh
-c '
28 . /usr/share/debconf/confmodule
30 db_get locales/locales_to_be_generated &&
31 mkdir -p /var/lib/locales/supported.d &&
32 echo "$RET" > /var/lib/locales/supported.d/local'; then
33 $ROOTCMD dpkg-reconfigure locales
38 # mk-basefile doesn't use the -updates suite, then we unpack it, then we
39 # install sources.list that has -updates and we install random
40 # packages. It might avoid a problem if we a dist-upgrade first.
42 $ROOTCMD apt-get update
43 $ROOTCMD apt-get
-y dist-upgrade
--purge --auto-remove