|
 |
f96e0b |
From 14589a819717d1d6614687202159a0070bba1f8f Mon Sep 17 00:00:00 2001
|
|
 |
f96e0b |
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
 |
f96e0b |
Date: Sun, 22 Jul 2012 20:02:17 +0200
|
|
 |
f96e0b |
Subject: [PATCH 016/482] * util/grub-mkconfig_lib.in (grub_quote):
|
|
 |
f96e0b |
Remove extra layer of escape. * util/grub.d/10_hurd.in: Add missing quoting.
|
|
 |
f96e0b |
* util/grub.d/10_illumos.in: Likewise. * util/grub.d/10_kfreebsd.in:
|
|
 |
f96e0b |
Likewise. * util/grub.d/10_linux.in: Likewise. *
|
|
 |
f96e0b |
util/grub.d/20_linux_xen.in: Likewise.
|
|
 |
f96e0b |
|
|
 |
f96e0b |
---
|
|
 |
f96e0b |
ChangeLog | 9 +++++++++
|
|
 |
f96e0b |
util/grub-mkconfig_lib.in | 10 +++++-----
|
|
 |
f96e0b |
util/grub.d/10_hurd.in | 4 ++--
|
|
 |
f96e0b |
util/grub.d/10_illumos.in | 1 +
|
|
 |
f96e0b |
util/grub.d/10_kfreebsd.in | 2 +-
|
|
 |
f96e0b |
util/grub.d/10_linux.in | 4 ++--
|
|
 |
f96e0b |
util/grub.d/20_linux_xen.in | 6 +++---
|
|
 |
f96e0b |
7 files changed, 23 insertions(+), 13 deletions(-)
|
|
 |
f96e0b |
|
|
 |
f96e0b |
diff --git a/ChangeLog b/ChangeLog
|
|
 |
f96e0b |
index a21708c..0db6239 100644
|
|
 |
f96e0b |
--- a/ChangeLog
|
|
 |
f96e0b |
+++ b/ChangeLog
|
|
 |
f96e0b |
@@ -1,5 +1,14 @@
|
|
 |
f96e0b |
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
|
|
 |
f96e0b |
|
|
 |
f96e0b |
+ * util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
|
|
 |
f96e0b |
+ * util/grub.d/10_hurd.in: Add missing quoting.
|
|
 |
f96e0b |
+ * util/grub.d/10_illumos.in: Likewise.
|
|
 |
f96e0b |
+ * util/grub.d/10_kfreebsd.in: Likewise.
|
|
 |
f96e0b |
+ * util/grub.d/10_linux.in: Likewise.
|
|
 |
f96e0b |
+ * util/grub.d/20_linux_xen.in: Likewise.
|
|
 |
f96e0b |
+
|
|
 |
f96e0b |
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
|
|
 |
f96e0b |
+
|
|
 |
f96e0b |
New command `lsefi'.
|
|
 |
f96e0b |
|
|
 |
f96e0b |
* grub-core/Makefile.core.def (lsefi): New module.
|
|
 |
f96e0b |
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
|
 |
f96e0b |
index 76133b4..beb52ee 100644
|
|
 |
f96e0b |
--- a/util/grub-mkconfig_lib.in
|
|
 |
f96e0b |
+++ b/util/grub-mkconfig_lib.in
|
|
 |
f96e0b |
@@ -255,19 +255,19 @@ version_find_latest ()
|
|
 |
f96e0b |
echo "$version_find_latest_a"
|
|
 |
f96e0b |
}
|
|
 |
f96e0b |
|
|
 |
f96e0b |
-# One layer of quotation is eaten by "", the second by sed, and the third by
|
|
 |
f96e0b |
-# printf; so this turns ' into \'. Note that you must use the output of
|
|
 |
f96e0b |
+# One layer of quotation is eaten by "" and the second by
|
|
 |
f96e0b |
+# sed; so this turns ' into \'. Note that you must use the output of
|
|
 |
f96e0b |
# this function in a printf format string.
|
|
 |
f96e0b |
|
|
 |
f96e0b |
grub_quote () {
|
|
 |
f96e0b |
- sed "s/'/'\\\\\\\\''/g"
|
|
 |
f96e0b |
+ sed "s/'/'\\\\''/g"
|
|
 |
f96e0b |
}
|
|
 |
f96e0b |
|
|
 |
f96e0b |
gettext_quoted () {
|
|
 |
f96e0b |
- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
|
|
 |
f96e0b |
+ gettext "$@" | grub_quote
|
|
 |
f96e0b |
}
|
|
 |
f96e0b |
|
|
 |
f96e0b |
-# Run the first argument through gettext_quoted, and then pass that and all
|
|
 |
f96e0b |
+# Run the first argument through gettext, and then pass that and all
|
|
 |
f96e0b |
# remaining arguments to printf. This is a useful abbreviation and tends to
|
|
 |
f96e0b |
# be easier to type.
|
|
 |
f96e0b |
gettext_printf () {
|
|
 |
f96e0b |
diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
|
|
 |
f96e0b |
index 6451060..45f0ad3 100644
|
|
 |
f96e0b |
--- a/util/grub.d/10_hurd.in
|
|
 |
f96e0b |
+++ b/util/grub.d/10_hurd.in
|
|
 |
f96e0b |
@@ -117,7 +117,7 @@ EOF
|
|
 |
f96e0b |
opts=
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
|
|
 |
f96e0b |
@@ -133,7 +133,7 @@ EOF
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
|
|
 |
f96e0b |
--multiboot-command-line='\${kernel-command-line}' \\
|
|
 |
f96e0b |
--host-priv-port='\${host-port}' \\
|
|
 |
f96e0b |
diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in
|
|
 |
f96e0b |
index 422d56f..2477466 100644
|
|
 |
f96e0b |
--- a/util/grub.d/10_illumos.in
|
|
 |
f96e0b |
+++ b/util/grub.d/10_illumos.in
|
|
 |
f96e0b |
@@ -46,6 +46,7 @@ message="$(gettext_printf "Loading kernel of Illumos ...")"
|
|
 |
f96e0b |
ISADIR=
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
|
|
 |
f96e0b |
module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
|
|
 |
f96e0b |
}
|
|
 |
f96e0b |
diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
|
|
 |
f96e0b |
index 93405a6..b0e84e2 100644
|
|
 |
f96e0b |
--- a/util/grub.d/10_kfreebsd.in
|
|
 |
f96e0b |
+++ b/util/grub.d/10_kfreebsd.in
|
|
 |
f96e0b |
@@ -100,7 +100,7 @@ kfreebsd_entry ()
|
|
 |
f96e0b |
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
|
|
 |
f96e0b |
message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
kfreebsd ${rel_dirname}/${basename} ${args}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
|
|
 |
f96e0b |
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
 |
f96e0b |
index 14402e8..35f7a83 100644
|
|
 |
f96e0b |
--- a/util/grub.d/10_linux.in
|
|
 |
f96e0b |
+++ b/util/grub.d/10_linux.in
|
|
 |
f96e0b |
@@ -134,14 +134,14 @@ linux_entry ()
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
message="$(gettext_printf "Loading Linux %s ..." ${version})"
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
if test -n "${initrd}" ; then
|
|
 |
f96e0b |
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
|
 |
f96e0b |
message="$(gettext_printf "Loading initial ramdisk ...")"
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
initrd ${rel_dirname}/${initrd}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
|
 |
f96e0b |
index 1d94502..33f1592 100644
|
|
 |
f96e0b |
--- a/util/grub.d/20_linux_xen.in
|
|
 |
f96e0b |
+++ b/util/grub.d/20_linux_xen.in
|
|
 |
f96e0b |
@@ -120,16 +120,16 @@ linux_entry ()
|
|
 |
f96e0b |
xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
|
|
 |
f96e0b |
lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$xmessage'
|
|
 |
f96e0b |
+ echo '$(echo "$xmessage" | grub_quote)'
|
|
 |
f96e0b |
multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
|
|
 |
f96e0b |
- echo '$lmessage'
|
|
 |
f96e0b |
+ echo '$(echo "$lmessage" | grub_quote)'
|
|
 |
f96e0b |
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
if test -n "${initrd}" ; then
|
|
 |
f96e0b |
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
|
 |
f96e0b |
message="$(gettext_printf "Loading initial ramdisk ...")"
|
|
 |
f96e0b |
sed "s/^/$submenu_indentation/" << EOF
|
|
 |
f96e0b |
- echo '$message'
|
|
 |
f96e0b |
+ echo '$(echo "$message" | grub_quote)'
|
|
 |
f96e0b |
module ${rel_dirname}/${initrd}
|
|
 |
f96e0b |
EOF
|
|
 |
f96e0b |
fi
|
|
 |
f96e0b |
--
|
|
 |
f96e0b |
1.8.2.1
|
|
 |
f96e0b |
|