X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fupdatebase.UBUNTU;h=98f775f077c3d871191b9cb1a2bcae427ab5ff4e;hp=e5050cd12464bbfc6cbfa4d3fdb24715d39cd327;hb=HEAD;hpb=edb1a99660561c51aa5c7803d978284c7b423842 diff --git a/fai/config/hooks/updatebase.UBUNTU b/fai/config/hooks/updatebase.UBUNTU index e5050cd..98f775f 100755 --- a/fai/config/hooks/updatebase.UBUNTU +++ b/fai/config/hooks/updatebase.UBUNTU @@ -1,5 +1,12 @@ #! /bin/bash +# mk-basefile doesn't use the -updates suite, then we unpack it, then we +# install sources.list that has -updates and we install random +# packages. It might avoid a problem if we a dist-upgrade first. + +$ROOTCMD apt-get update +$ROOTCMD apt-get -y dist-upgrade --purge --auto-remove + # 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 @@ -9,8 +16,9 @@ # 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 ' + $ROOTCMD debconf --owner=locales sh -c ' . /usr/share/debconf/confmodule db_version 2.0 db_get locales/locales_to_be_generated &&