]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 22 Jul 2012 18:02:17 +0000 (20:02 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 22 Jul 2012 18:02:17 +0000 (20:02 +0200)
* util/grub.d/10_hurd.in: Add missing quoting.
* util/grub.d/10_illumos.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

ChangeLog
util/grub-mkconfig_lib.in
util/grub.d/10_hurd.in
util/grub.d/10_illumos.in
util/grub.d/10_kfreebsd.in
util/grub.d/10_linux.in
util/grub.d/20_linux_xen.in

index a21708ca4ee5a009ec02613cb5ecdff34f9edc84..0db62395bc087c265758dc9cc0bfac40e4c22493 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
+       * util/grub.d/10_hurd.in: Add missing quoting.
+       * util/grub.d/10_illumos.in: Likewise.
+       * util/grub.d/10_kfreebsd.in: Likewise.
+       * util/grub.d/10_linux.in: Likewise.
+       * util/grub.d/20_linux_xen.in: Likewise.
+
 2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
 
        New command `lsefi'.
index 76133b4c169ebb0afda21ea487381492aa9c8438..beb52ee9bbe57768bfe88f0472f4c07922e95088 100644 (file)
@@ -255,19 +255,19 @@ version_find_latest ()
   echo "$version_find_latest_a"
 }
 
-# One layer of quotation is eaten by "", the second by sed, and the third by
-# printf; so this turns ' into \'.  Note that you must use the output of
+# One layer of quotation is eaten by "" and the second by
+# sed; so this turns ' into \'.  Note that you must use the output of
 # this function in a printf format string.
 
 grub_quote () {
-  sed "s/'/'\\\\\\\\''/g"
+  sed "s/'/'\\\\''/g"
 }
 
 gettext_quoted () {
-  gettext "$@" | sed "s/'/'\\\\\\\\''/g"
+  gettext "$@" | grub_quote
 }
 
-# Run the first argument through gettext_quoted, and then pass that and all
+# Run the first argument through gettext, and then pass that and all
 # remaining arguments to printf.  This is a useful abbreviation and tends to
 # be easier to type.
 gettext_printf () {
index 64510605eaf5bc554c0c97ba5850fe933c4d1dbc..45f0ad32844c332a4514d2043f44a646b15e9aba 100644 (file)
@@ -117,7 +117,7 @@ EOF
       opts=
   fi
   sed "s/^/$submenu_indentation/" << EOF
-       echo            '$message'
+       echo            '$(echo "$message" | grub_quote)'
        multiboot       ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
 EOF
 
@@ -133,7 +133,7 @@ EOF
   fi
 
   sed "s/^/$submenu_indentation/" << EOF
-       echo            '$message'
+       echo            '$(echo "$message" | grub_quote)'
        module          /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
                        --multiboot-command-line='\${kernel-command-line}' \\
                        --host-priv-port='\${host-port}' \\
index 422d56f2a14e5d60519c1b129b84793b5a0bac40..2477466db1f56c458dc859adca4a248a083b44ac 100644 (file)
@@ -46,6 +46,7 @@ message="$(gettext_printf "Loading kernel of Illumos ...")"
                ISADIR=
        fi
        zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
+        echo '$(echo "$message" | grub_quote)'
        multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
        module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
 }
index 93405a6d4f7ece39e90a1a89d74919fc1a15b29a..b0e84e2bf5691783a44b593353596ea18931e949 100644 (file)
@@ -100,7 +100,7 @@ kfreebsd_entry ()
   printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
   message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
   sed "s/^/$submenu_indentation/" << EOF
-       echo                    '$message'
+       echo                    '$(echo "$message" | grub_quote)'
        kfreebsd                ${rel_dirname}/${basename} ${args}
 EOF
 
index 14402e86cc830f89d097db43c46b9dc6f35c30fd..35f7a8371b6281dad72e291292f44f216cffc251 100644 (file)
@@ -134,14 +134,14 @@ linux_entry ()
   fi
   message="$(gettext_printf "Loading Linux %s ..." ${version})"
   sed "s/^/$submenu_indentation/" << EOF
-       echo    '$message'
+       echo    '$(echo "$message" | grub_quote)'
        linux   ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
-       echo    '$message'
+       echo    '$(echo "$message" | grub_quote)'
        initrd  ${rel_dirname}/${initrd}
 EOF
   fi
index 1d94502eed4212594979a7a25c17c75034cbb69f..33f159220e1409e0cecd45b5f7f72352666bb384 100644 (file)
@@ -120,16 +120,16 @@ linux_entry ()
   xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
   lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
   sed "s/^/$submenu_indentation/" << EOF
-       echo    '$xmessage'
+       echo    '$(echo "$xmessage" | grub_quote)'
        multiboot       ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
-       echo    '$lmessage'
+       echo    '$(echo "$lmessage" | grub_quote)'
        module  ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
-       echo    '$message'
+       echo    '$(echo "$message" | grub_quote)'
        module  ${rel_dirname}/${initrd}
 EOF
   fi