From: Michael Prokop Date: Tue, 7 Mar 2017 16:08:38 +0000 (+0100) Subject: If locales-all package is installed skip locales generation X-Git-Tag: v0.29.1~3 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=a28b0fd6e5860bf51a45a1189393a72053b2eea5 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. --- 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