All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] suppress error message "/grub2/locale/en.mo.gz not found"
@ 2012-09-24  6:51 Michael Chang
  2012-09-24  9:37 ` Mads Kiilerich
  2012-09-25 21:52 ` Colin Watson
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Chang @ 2012-09-24  6:51 UTC (permalink / raw)
  To: grub-devel; +Cc: Michael Chang

We don't insert gettext module if message catalog file missing to
prevent error message from being logged.

Signed-off-by: Michael Chang <mchang@suse.com>
---
 util/grub.d/00_header.in |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index bb34ef2..d438d52 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -182,10 +182,14 @@ EOF
 
 # Gettext variables and module
 if [ "x${LANG}" != "xC" ] ; then
+# We don't insert gettext module if message catalog file missing
+# To prevent error message from being logged (bnc#771393)
   cat << EOF
-  set locale_dir=\$prefix/locale
-  set lang=${grub_lang}
-  insmod gettext
+  if [ -f "\$prefix/locale/${grub_lang}.mo" ] ; then
+    set locale_dir=\$prefix/locale
+    set lang=${grub_lang}
+    insmod gettext
+  fi
 EOF
 fi
 
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-05  7:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24  6:51 [PATCH] suppress error message "/grub2/locale/en.mo.gz not found" Michael Chang
2012-09-24  9:37 ` Mads Kiilerich
2012-09-24 18:40   ` Andrey Borzenkov
2012-09-25  4:46     ` Michael Chang
2012-09-25 15:24       ` Andrey Borzenkov
2012-09-25 18:52         ` Andrey Borzenkov
2012-09-25 21:54       ` Colin Watson
2012-09-26  7:44         ` Michael Chang
2012-09-26 12:52           ` Colin Watson
2012-09-25  3:49   ` Michael Chang
2012-09-25 21:52 ` Colin Watson
2013-04-05  7:23   ` Andrey Borzenkov

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.