* (PATCH) force LANG=C for selinux load policy
@ 2011-05-31 8:19 haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg
[not found] ` <4915AF3239D2024A92BCEC8BDAC566CE0116FA8A-9Dnl1bLEA2hgYsFYm0uEO7jjLBE8jN/0@public.gmane.org>
[not found] ` <1306833291-sup-8652@ittemni>
0 siblings, 2 replies; 4+ messages in thread
From: haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg @ 2011-05-31 8:19 UTC (permalink / raw)
To: harald-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA
Hi Harold,
Using Japanese ja_JP.UTF-8 environment,
the characters in load selinux policy message are garbled.
This simple patch mainly adds force LANG=C to selinux load policy.
Kind regards,
Haruo.
--- dracut-010/modules.d/98selinux/selinux-loadpolicy.sh.orig 2011-05-31 14:36:34.000000000 +0900
+++ dracut-010/modules.d/98selinux/selinux-loadpolicy.sh 2011-05-31 14:38:44.000000000 +0900
@@ -4,6 +4,11 @@
# FIXME: load selinux policy. this should really be done after we switchroot
+# We can't Japanese on normal console at boot time, so force LANG=C.
+if [ "$LANG" = "ja_JP.UTF-8" ]; then
+ LANG=C
+fi
+
rd_load_policy()
{
# If SELinux is disabled exit now--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <4915AF3239D2024A92BCEC8BDAC566CE0116FA8A-9Dnl1bLEA2hgYsFYm0uEO7jjLBE8jN/0@public.gmane.org>]
* Re: (PATCH) force LANG=C for selinux load policy [not found] ` <4915AF3239D2024A92BCEC8BDAC566CE0116FA8A-9Dnl1bLEA2hgYsFYm0uEO7jjLBE8jN/0@public.gmane.org> @ 2011-05-31 9:17 ` Harald Hoyer [not found] ` <4DE4B247.6010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Harald Hoyer @ 2011-05-31 9:17 UTC (permalink / raw) To: haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On 31.05.2011 10:19, haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg@public.gmane.org wrote: > Hi Harold, > > Using Japanese ja_JP.UTF-8 environment, > the characters in load selinux policy message are garbled. > This simple patch mainly adds force LANG=C to selinux load policy. > > Kind regards, > Haruo. > > --- dracut-010/modules.d/98selinux/selinux-loadpolicy.sh.orig 2011-05-31 14:36:34.000000000 +0900 > +++ dracut-010/modules.d/98selinux/selinux-loadpolicy.sh 2011-05-31 14:38:44.000000000 +0900 > @@ -4,6 +4,11 @@ > > # FIXME: load selinux policy. this should really be done after we switchroot > > +# We can't Japanese on normal console at boot time, so force LANG=C. > +if [ "$LANG" = "ja_JP.UTF-8" ]; then > + LANG=C > +fi > + > rd_load_policy() > { > # If SELinux is disabled exit now Hmm, why are the messages garbled? Is the console not set up correctly? ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <4DE4B247.6010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* RE: (PATCH) force LANG=C for selinux load policy [not found] ` <4DE4B247.6010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2011-06-01 8:02 ` haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg 0 siblings, 0 replies; 4+ messages in thread From: haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg @ 2011-06-01 8:02 UTC (permalink / raw) To: harald-H+wXaHxf7aLQT0dZR+AlfA; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA > Hmm, why are the messages garbled? Is the console not set up correctly? I think that the console's being not able to display Japanese is a cause though the language setting is Japanese. Therefore, force LANG=C set with dracut. Is there something a good idea? -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1306833291-sup-8652@ittemni>]
* RE: (PATCH) force LANG=C for selinux load policy [not found] ` <1306833291-sup-8652@ittemni> @ 2011-06-01 8:02 ` haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg 0 siblings, 0 replies; 4+ messages in thread From: haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg @ 2011-06-01 8:02 UTC (permalink / raw) To: aidecoe-2qtfh70TtYba5EbDDlwbIw Cc: harald-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA > This is too strict. Is this only for Japanese? Umm perhaps No. I think that I garble excluding Japanese. For instance, Chinese... > On some system there's > also suffix “utf8” instead of “UTF-8”. Why not just uncoditionally > LANG=C and/or LC_ALL=C before specific commands? It thought about the influence of an overwrite of LC_ALL of LANG. I think that set LANG=C without checking the language. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-01 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 8:19 (PATCH) force LANG=C for selinux load policy haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg
[not found] ` <4915AF3239D2024A92BCEC8BDAC566CE0116FA8A-9Dnl1bLEA2hgYsFYm0uEO7jjLBE8jN/0@public.gmane.org>
2011-05-31 9:17 ` Harald Hoyer
[not found] ` <4DE4B247.6010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-06-01 8:02 ` haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg
[not found] ` <1306833291-sup-8652@ittemni>
2011-06-01 8:02 ` haruo.tomita-g3qfMnKXm6lL9jVzuh4AOg
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.