From a28b0fd6e5860bf51a45a1189393a72053b2eea5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 7 Mar 2017 17:08:38 +0100 Subject: [PATCH] If locales-all package is installed skip locales generation Otherwise the wrong (+ missing) locales might end up on the system if locales-all is installed. If the ISO size doesn't matter then this also speeds up the ISO generation process since locale-gen doesn't need to be executed. --- etc/grml/fai/config/scripts/GRMLBASE/25-locales | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/25-locales b/etc/grml/fai/config/scripts/GRMLBASE/25-locales index 6dc4d66..277b684 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/25-locales +++ b/etc/grml/fai/config/scripts/GRMLBASE/25-locales @@ -42,13 +42,6 @@ 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 +49,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 -- 2.1.4