X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=28684ddb9a7a670a947196a6257f10bddeda14c3;hp=6d01a89dfa915983354b2ec43a74732059410464;hb=2ef61aac8e83be7d8a53cf6914ce3c29004c2143;hpb=6e7a2c86d3a42f6477756a59f1a3de744cc091a3 diff --git a/chroot-script b/chroot-script index 6d01a89..28684dd 100755 --- a/chroot-script +++ b/chroot-script @@ -431,7 +431,13 @@ EOF # set default locales {{{ default_locales() { if [ -n "$DEFAULT_LOCALES" ] ; then - update-locale LANG="$DEFAULT_LOCALES" + if ! [ -x /usr/sbin/update-locale ] ; then + echo "Warning: update-locale executable not available (no locales package installed?)" + echo "Ignoring request to run update-locale for $DEFAULT_LOCALES therefore" + return 0 + fi + + /usr/sbin/update-locale LANG="$DEFAULT_LOCALES" fi } # }}}