From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TG2Yc-0007CA-OR for mharc-grub-devel@gnu.org; Mon, 24 Sep 2012 02:54:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG2Ya-0007BK-Hy for grub-devel@gnu.org; Mon, 24 Sep 2012 02:54:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG2YZ-0004Ln-L7 for grub-devel@gnu.org; Mon, 24 Sep 2012 02:54:16 -0400 Received: from mail-qc0-f169.google.com ([209.85.216.169]:41532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG2YZ-0004Lj-Fe for grub-devel@gnu.org; Mon, 24 Sep 2012 02:54:15 -0400 Received: by qcsd16 with SMTP id d16so5592799qcs.0 for ; Sun, 23 Sep 2012 23:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=eeY72/sESr5KO0yacUY0MvyVUb/S+Bk613y56LrfFOI=; b=SkOYZDrR9gZFAq6k+WeA5PMSWG62KHlxv6hSIBM695ROzrcWqV8Bb1e2AJIMDXSRaZ z7Nyag+NRxr0alY2ecxd+XmEuhWiODVfwopZ2JAPaI+FJhnk1rgywecGDqWGcMgVwqX3 JDybegyZ1eRXeybCdExzVN3Xn4+35o4h/UEvvWbTIqHKmcWX/fPhgtm4uUqGwKf6INtX 5a0v+Nn3br2fTWd7cDVLtJfpg+hLxUKxv2usPyUl1lteq8IovdTpQdAjbx+KddFdtS+3 Xxwl0ZayvGkyuX72mhIBAjcCGs2bzaYhbUBMXqh/t9VanDuw3kFEMewMKmofZy2gGZgL ZyWw== Received: by 10.224.206.131 with SMTP id fu3mr27524912qab.27.1348469654678; Sun, 23 Sep 2012 23:54:14 -0700 (PDT) Received: from localhost.localdomain ([130.57.30.250]) by mx.google.com with ESMTPS id k6sm24609529qac.0.2012.09.23.23.54.12 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Sep 2012 23:54:14 -0700 (PDT) Sender: =?UTF-8?B?5by15paH6I+v?= From: Michael Chang To: grub-devel@gnu.org Subject: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found" Date: Mon, 24 Sep 2012 14:51:49 +0800 Message-Id: <1348469509-21079-1-git-send-email-mchang@suse.com> X-Mailer: git-send-email 1.7.3.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.216.169 Cc: Michael Chang X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 06:54:17 -0000 We don't insert gettext module if message catalog file missing to prevent error message from being logged. Signed-off-by: Michael Chang --- 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