From 4e258bdad639b4e487e706ebd56504e92cc9481f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 8 Nov 2017 06:08:23 +0100 Subject: [PATCH] zypper-minimal: Set default locale env to C.UTF-8 Currently in Leap 42.x the bootup scripts don't actually make use of locale.conf yet, so we need to set it in /etc/sysconfig/language. For future distro compatibility the setting in locale.conf is kept in sync. Also fix default timezone link. Change-Id: I59e5dccad8a5ae132d3039851e7aa1db86a609d7 --- .../elements/zypper-minimal/root.d/08-zypper-chroot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot index c2c8a900..fad78feb 100755 --- a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +++ b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot @@ -105,10 +105,13 @@ echo -e "# This file intentionally left blank\n" | \ sudo tee $TARGET_ROOT/etc/resolv.conf # set the most reliable UTF-8 locale -echo -e 'LANG="en_US.UTF-8"' | \ +default_lang="C.UTF-8" +sudo sed -i -e "s,^RC_LANG=.*,RC_LANG=\"$default_lang\"," \ + $TARGET_ROOT/etc/sysconfig/language +echo -e "LANG=\"$default_lang\"" | \ sudo tee $TARGET_ROOT/etc/locale.conf # default to UTC -sudo chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/UTC \ +sudo chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/Etc/UTC \ /etc/localtime # RPM doesn't know whether files have been changed since install