From: Michael Chang <mchang@suse.com>
To: grub-devel@gnu.org
Cc: Michael Chang <mchang@suse.com>
Subject: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found"
Date: Mon, 24 Sep 2012 14:51:49 +0800 [thread overview]
Message-ID: <1348469509-21079-1-git-send-email-mchang@suse.com> (raw)
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>
---
| 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
--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
next reply other threads:[~2012-09-24 6:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 6:51 Michael Chang [this message]
2012-09-24 9:37 ` [PATCH] suppress error message "/grub2/locale/en.mo.gz not found" 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
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=1348469509-21079-1-git-send-email-mchang@suse.com \
--to=mchang@suse.com \
--cc=grub-devel@gnu.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 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.