grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Config file generation failure on Linux


From: Grégoire Sutre
Subject: Config file generation failure on Linux
Date: Wed, 30 Dec 2009 16:01:01 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Hi,

Config file generation with grub-mkconfig fails on Linux when grub is not installed in the same prefix as gettext, since the script util/grub.d/10_linux.in contains:

. ${bindir}/gettext.sh

A possible patch is given below, but there are surely other ways to deal with it. The patch simply falls back to echo instead of gettext if the gettext binary cannot be found.

Thanks for your time,

Grégoire

--- util/grub.d/10_linux.in.orig        2009-12-30 15:37:01.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -22,7 +22,12 @@ address@hidden@
 address@hidden@
 . ${libdir}/grub/grub-mkconfig_lib

-. ${bindir}/gettext.sh
+if $(which gettext >/dev/null 2>/dev/null) ; then
+  gettext="gettext"
+else
+  gettext="echo"
+fi
+
 export address@hidden@
 export address@hidden@

@@ -54,9 +59,9 @@ linux_entry ()
   recovery="$3"
   args="$4"
   if ${recovery} ; then
-    title="$(gettext "%s, with Linux %s (recovery mode)")"
+    title="$(${gettext} "%s, with Linux %s (recovery mode)")"
   else
-    title="$(gettext "%s, with Linux %s")"
+    title="$(${gettext} "%s, with Linux %s")"
   fi
   printf "menuentry \"${title}\" {\n" "${os}" "${version}"
   if [ -z "${prepare_boot_cache}" ]; then




reply via email to

[Prev in Thread] Current Thread [Next in Thread]