X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fupdatebase.UBUNTU;h=e5050cd12464bbfc6cbfa4d3fdb24715d39cd327;hp=77bc497dd5ff4a51ccaf7f3e228bd6abf4584b17;hb=fe81034ee9664d8e131bac218b40d99a58a31649;hpb=53db7c23cb11661c98a08d69295bb315c392003b diff --git a/fai/config/hooks/updatebase.UBUNTU b/fai/config/hooks/updatebase.UBUNTU deleted file mode 120000 index 77bc497..0000000 --- a/fai/config/hooks/updatebase.UBUNTU +++ /dev/null @@ -1 +0,0 @@ -updatebase.DEBIAN \ No newline at end of file diff --git a/fai/config/hooks/updatebase.UBUNTU b/fai/config/hooks/updatebase.UBUNTU new file mode 100755 index 0000000..e5050cd --- /dev/null +++ b/fai/config/hooks/updatebase.UBUNTU @@ -0,0 +1,20 @@ +#! /bin/bash + +# https://lists.uni-koeln.de/pipermail/linux-fai/2016-July/011398.html +# In Ubuntu 16.04 (but not 14.04), the locales configuration mechanism has +# changed. There is a /var/lib/dpkg/info/locales.config file, which +# overrides /var/lib/dpkg/info/locales.postinst and consults +# /var/lib/locales/supported.d/local instead of the debconf system. (See +# the code in /usr/share/debconf/frontend that prefers locales.config.) This +# hook applies the debconf setting. It must run after FAI's debconf task +# but before dpkg gets a chance to clobber debconf with an empty setting. + +if [ ! -f "$target/var/lib/locales/supported.d/local" ]; then + $ROOTCMD debconf --owner=locales sh -c ' + . /usr/share/debconf/confmodule + db_version 2.0 + db_get locales/locales_to_be_generated && + mkdir -p /var/lib/locales/supported.d && + echo "$RET" > /var/lib/locales/supported.d/local' && + $ROOTCMD dpkg-reconfigure locales +fi