mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Andrey Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] i18n: do not use systemd-vconsole-setup
Date: Wed, 10 Nov 2010 15:53:33 +0100	[thread overview]
Message-ID: <4CDAB1ED.2070605@redhat.com> (raw)
In-Reply-To: <1289078089-3599-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 11/06/2010 10:14 PM, Andrey Borzenkov wrote:
> systemd-vconsole-setup was not designed to be run from udevd.
> It checks locale environment to decide, whether UNICODE should
> be enabled or disabled. Normally environment is setup by
> systemd; but the only environment available in udev rules is
> those from device properties. It means systemd-vconsole-setup
> always assumes default C locale and disables UNICODE.
>
> Revert to using built-in console_init which explicitly
> imports locale settings from /etc/vconsole.conf. Alternative
> is to revert 6545b9d7 and call console_init directly :)
>
> Additionally patch fixes console_init to use new namespace as
> well as ensures that default font is always installed.
>
> Signed-off-by: Andrey Borzenkov<arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> ---
>   modules.d/10i18n/console_init |   10 +++++-----
>   modules.d/10i18n/install      |   18 ++++++++----------
>   2 files changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/modules.d/10i18n/console_init b/modules.d/10i18n/console_init
> index e6f2da4..bdd39b0 100755
> --- a/modules.d/10i18n/console_init
> +++ b/modules.d/10i18n/console_init
> @@ -4,7 +4,7 @@
>
>   [ -e /etc/vconsole.conf ]&&  . /etc/vconsole.conf
>
> -DEFAULT_SYSFONT=LatArCyrHeb-16
> +DEFAULT_FONT=LatArCyrHeb-16
>   DEFAULT_KEYMAP=/etc/sysconfig/console/default.kmap
>
>   set_keyboard() {
> @@ -42,11 +42,11 @@ set_keymap() {
>   set_font() {
>       local dev=$1; local trans=''; local uni=''
>
> -    [ -z "${SYSFONT}" ]&&  SYSFONT=${DEFAULT_SYSFONT}
> -    [ -n "${CONTRANS}" ]&&  trans="-m ${CONTRANS}"
> -    [ -n "${UNIMAP}" ]&&  uni="-u ${UNIMAP}"
> +    [ -z "${FONT}" ]&&  FONT=${DEFAULT_FONT}
> +    [ -n "${FONT_MAP}" ]&&  trans="-m ${FONT_MAP}"
> +    [ -n "${FONT_UNIMAP}" ]&&  uni="-u ${FONT_UNIMAP}"
>
> -    setfont ${SYSFONT} -C ${dev} ${trans} ${uni}
> +    setfont ${FONT} -C ${dev} ${trans} ${uni}
>   }
>
>   dev_close() {
> diff --git a/modules.d/10i18n/install b/modules.d/10i18n/install
> index d8647c0..96d563d 100755
> --- a/modules.d/10i18n/install
> +++ b/modules.d/10i18n/install
> @@ -73,13 +73,7 @@ gather_vars() {
>   install_base() {
>       dracut_install setfont loadkeys kbd_mode stty
>
> -    if [ -x /lib/systemd/systemd-vconsole-setup ]; then
> -        dracut_install /lib/systemd/systemd-vconsole-setup
> -        inst_dir /lib/udev
> -        ln -s /lib/systemd/systemd-vconsole-setup "${initdir}/lib/udev/console_init"
> -    else
> -        inst ${moddir}/console_init /lib/udev/console_init
> -    fi
> +    inst ${moddir}/console_init /lib/udev/console_init
>       inst_rules ${moddir}/10-console.rules
>       inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
>   }
> @@ -123,9 +117,13 @@ install_local_i18n() {
>
>       inst_opt_decompress ${KEYMAPS}
>
> -    [[ ${FONT} ]] || FONT=${DEFAULT_FONT}
> -    FONT=${FONT%.psf*}
> -    inst_opt_decompress ${kbddir}/consolefonts/${FONT}.*
> +    inst_opt_decompress ${kbddir}/consolefonts/${DEFAULT_FONT}.*
> +
> +    if [[ ${FONT} ]]
> +    then
> +        FONT=${FONT%.psf*}
> +        inst_opt_decompress ${kbddir}/consolefonts/${FONT}.*
> +    fi
>
>       if [[ ${FONT_MAP} ]]
>       then

pushed

      parent reply	other threads:[~2010-11-10 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 21:14 [PATCH] i18n: do not use systemd-vconsole-setup Andrey Borzenkov
     [not found] ` <1289078089-3599-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-10 14:53   ` Harald Hoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CDAB1ED.2070605@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox