X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F25-locales;h=277b684f24cde5ac1bb2beb188506841c3f5a935;hp=99876147342b364912b4b2a808b6af470acc2387;hb=HEAD;hpb=dd814754c67b9089428e17756d40fd848c58647f diff --git a/etc/grml/fai/config/scripts/GRMLBASE/25-locales b/etc/grml/fai/config/scripts/GRMLBASE/25-locales index 9987614..59a4e71 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/25-locales +++ b/etc/grml/fai/config/scripts/GRMLBASE/25-locales @@ -13,6 +13,9 @@ set -e # the full setup, GRMLBASE installs a minimal configuration fcopy -v /etc/locale.gen +# set up /etc/locale.conf, to avoid systemd-firstboot prompting for user input +fcopy -v /etc/locale.conf + # get rid of locales unless using class LOCALES set +u if ! ifclass LOCALES ; then @@ -38,17 +41,10 @@ fi # make sure: # localepurge localepurge/nopurge multiselect .... # is set so localepurge works as expected -if [ -x $target/usr/sbin/localepurge ] ; then +if $ROOTCMD dpkg --list localepurge 2>&1 | grep -q '^ii' ; then $ROOTCMD dpkg-reconfigure -f noninteractive localepurge fi -if ! [ -x $target/usr/sbin/locale-gen ] ; then - echo 'Warning: locale-gen [package locales] not installed' -else - echo "Running locale-gen" - $ROOTCMD locale-gen -fi - if ! [ -x $target/usr/sbin/localepurge ] ; then echo "Warning: localepurge not installed" else @@ -56,5 +52,16 @@ else $ROOTCMD localepurge fi +if $ROOTCMD dpkg-query -s locales-all >/dev/null 2>&1 ; then + echo "locales-all installed, skipping locales generation" +else + if ! [ -x ${target}/usr/sbin/locale-gen ] ; then + echo 'Warning: locale-gen [package locales] not installed' + else + echo "Running locale-gen" + $ROOTCMD locale-gen + fi +fi + ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2