From: Paul Hänsch Date: Wed, 17 Jul 2019 09:10:51 +0000 (+0200) Subject: working timezone and locale settings X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=7251742b7cfa1490d0a021974482d08bdf4acadd;p=blast working timezone and locale settings --- diff --git a/modules/default.mk b/modules/default.mk index 4cbc7ea..fdeff30 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -23,33 +23,26 @@ _debconf_selections: ${SYSROOT} .PHONY: _timezone _locales ifdef timezone -define DEBCONF := -${DEBCONF} -tzdata tzdata/Areas select $(firstword $(subst /,${space_},${timezone})) -tzdata tzdata/Zones/Europe select $(lastword $(subst /,${space_},${timezone})) -endef +export timezone PACKAGES := ${PACKAGES} tzdata _config: _timezone endif ifdef locales -define DEBCONF := -${DEBCONF} -locales locales/locales_to_be_generated multiselect ${locales} -locales locales/default_environment_locale select $(firstword $(subst ${comma_},${space_},${locales})) -endef -#$(addsuffix ${space_}UTF-8,$(subst ${comma_},${space_}${comma},${locales})) PACKAGES := ${PACKAGES} locales _config: _locales endif _timezone: ${CFGROOT} - rm "$${CFGROOT}/etc/timezone" - chroot "$${CFGROOT}" dpkg-reconfigure --default-priority -u tzdata + printf '%s\n' "$${timezone}" >"$${CFGROOT}/etc/timezone" + ln -sf /usr/share/zoneinfo/"$${timezone}" "$${CFGROOT}/etc/localtime" _locales: ${CFGROOT} - rm "$${CFGROOT}/etc/default/locale" "$${CFGROOT}/etc/locale.gen" - chroot "$${CFGROOT}" dpkg-reconfigure --default-priority -u locales + for l in $(subst ${comma_},${space_},${locales}); do \ + printf '%s %s\n' "$${l}" "$${l#*.}"; \ + done >"$${CFGROOT}/etc/locale.gen" + printf 'LANG=%s\n' "$(firstword $(subst ${comma_},${space_},${locales}))" >"$${CFGROOT}/etc/default/locale" + chroot "$${CFGROOT}" locale-gen .PHONY: _rootpass _users @@ -66,7 +59,6 @@ _rootpass: ${CFGROOT} chroot "$${CFGROOT}" usermod -p "$$(openssl passwd "$${rootpass}")" root _users: ${CFGROOT} - #sed -Ei 's;^SHELL=/bin/sh$$;SHELL=/bin/bash;;' "${CFGROOT}/etc/default/useradd" for u in $(subst ${comma_},${space_},${users}); do \ chroot "$${CFGROOT}" useradd -m -s /bin/bash -p "$$(openssl passwd "")" "$$u"; \ done