Blame SOURCES/0046-Make-SET_VARIABLE-get-handled-individually-in-GetNex.patch

903092
From 8a3357d1257e5e36648c944ff1e461f0f77c88f4 Mon Sep 17 00:00:00 2001
903092
From: Peter Jones <pjones@redhat.com>
903092
Date: Thu, 6 Aug 2015 10:07:11 -0400
903092
Subject: [PATCH 3/3] Make SET_VARIABLE get handled individually in
903092
 GetNextLine()
903092
903092
Resolves: rhbz#1152550
903092
903092
Signed-off-by: Peter Jones <pjones@redhat.com>
903092
---
903092
 .gitignore               |   2 +
903092
 grubby.c                 | 118 ++++++++++++++++++++++++++------
903092
 test.sh                  |   8 +++
903092
 test/grub2.16            | 156 +++++++++++++++++++++++++++++++++++++++++++
903092
 test/results/add/g2-1.16 | 170 +++++++++++++++++++++++++++++++++++++++++++++++
903092
 5 files changed, 433 insertions(+), 21 deletions(-)
903092
 create mode 100644 test/grub2.16
903092
 create mode 100644 test/results/add/g2-1.16
903092
903092
diff --git a/.gitignore b/.gitignore
903092
index e64d3bc..e78a392 100644
903092
--- a/.gitignore
903092
+++ b/.gitignore
903092
@@ -1,3 +1,5 @@
903092
 grubby
903092
 version.h
903092
 *.o
903092
+core.*
903092
+vgcore.*
903092
diff --git a/grubby.c b/grubby.c
903092
index 53c11a8..04c5bcb 100644
903092
--- a/grubby.c
903092
+++ b/grubby.c
903092
@@ -75,6 +75,7 @@ struct lineElement {
903092
 };
903092
 
903092
 enum lineType_e {
903092
+	LT_UNIDENTIFIED = 0,
903092
 	LT_WHITESPACE = 1 << 0,
903092
 	LT_TITLE = 1 << 1,
903092
 	LT_KERNEL = 1 << 2,
903092
@@ -740,6 +741,33 @@ static char *sdupprintf(const char *format, ...)
903092
 	return buf;
903092
 }
903092
 
903092
+static inline int
903092
+kwcmp(struct keywordTypes *kw, const char * label, int case_insensitive)
903092
+{
903092
+    int kwl = strlen(kw->key);
903092
+    int ll = strlen(label);
903092
+    int rc;
903092
+    int (*snc)(const char *s1, const char *s2, size_t n) =
903092
+           case_insensitive ? strncasecmp : strncmp;
903092
+    int (*sc)(const char *s1, const char *s2) =
903092
+           case_insensitive ? strcasecmp : strcmp;
903092
+
903092
+    rc = snc(kw->key, label, kwl);
903092
+    if (rc)
903092
+       return rc;
903092
+
903092
+    for (int i = kwl; i < ll; i++) {
903092
+       if (isspace(label[i]))
903092
+           return 0;
903092
+       if (kw->separatorChar && label[i] == kw->separatorChar)
903092
+           return 0;
903092
+       else if (kw->nextChar && label[i] == kw->nextChar)
903092
+           return 0;
903092
+       return sc(kw->key+kwl, label+kwl);
903092
+    }
903092
+    return 0;
903092
+}
903092
+
903092
 static enum lineType_e preferredLineType(enum lineType_e type,
903092
 					 struct configFileInfo *cfi)
903092
 {
903092
@@ -805,13 +833,8 @@ static enum lineType_e getTypeByKeyword(char *keyword,
903092
 					struct configFileInfo *cfi)
903092
 {
903092
 	for (struct keywordTypes * kw = cfi->keywords; kw->key; kw++) {
903092
-		if (cfi->caseInsensitive) {
903092
-			if (!strcasecmp(keyword, kw->key))
903092
-				return kw->type;
903092
-		} else {
903092
-			if (!strcmp(keyword, kw->key))
903092
-				return kw->type;
903092
-		}
903092
+		if (!kwcmp(kw, keyword, cfi->caseInsensitive))
903092
+			return kw->type;
903092
 	}
903092
 	return LT_UNKNOWN;
903092
 }
903092
@@ -906,6 +929,7 @@ static int readFile(int fd, char **bufPtr)
903092
 
903092
 static void lineInit(struct singleLine *line)
903092
 {
903092
+	line->type = LT_UNIDENTIFIED;
903092
 	line->indent = NULL;
903092
 	line->elements = NULL;
903092
 	line->numElements = 0;
903092
@@ -987,7 +1011,7 @@ static int lineWrite(FILE * out, struct singleLine *line,
903092
 
903092
 		if (fprintf(out, "%s", line->elements[i].item) == -1)
903092
 			return -1;
903092
-		if (i < line->numElements - 1)
903092
+		if (i < line->numElements - 1 || line->type == LT_SET_VARIABLE)
903092
 			if (fprintf(out, "%s", line->elements[i].indent) == -1)
903092
 				return -1;
903092
 	}
903092
@@ -1042,6 +1066,8 @@ static int getNextLine(char **bufPtr, struct singleLine *line,
903092
 				break;
903092
 			chptr++;
903092
 		}
903092
+		if (line->type == LT_UNIDENTIFIED)
903092
+			line->type = getTypeByKeyword(start, cfi);
903092
 		element->item = strndup(start, chptr - start);
903092
 		start = chptr;
903092
 
903092
@@ -1105,7 +1131,7 @@ static int getNextLine(char **bufPtr, struct singleLine *line,
903092
 				line->type = LT_WHITESPACE;
903092
 				line->numElements = 0;
903092
 			}
903092
-		} else {
903092
+		} else if (line->type == LT_INITRD) {
903092
 			struct keywordTypes *kw;
903092
 
903092
 			kw = getKeywordByType(line->type, cfi);
903092
@@ -1167,6 +1193,39 @@ static int getNextLine(char **bufPtr, struct singleLine *line,
903092
 					}
903092
 				}
903092
 			}
903092
+		} else if (line->type == LT_SET_VARIABLE) {
903092
+			/* and if it's a "set blah=" we need to split it
903092
+			 * yet a third way to avoid rhbz# XXX FIXME :/
903092
+			 */
903092
+			char *eq;
903092
+			int l;
903092
+			int numElements = line->numElements;
903092
+			struct lineElement *newElements;
903092
+			eq = strchr(line->elements[1].item, '=');
903092
+			if (!eq)
903092
+				return 0;
903092
+			l = eq - line->elements[1].item;
903092
+			if (eq[1] != 0)
903092
+				numElements++;
903092
+			newElements = calloc(numElements,sizeof (*newElements));
903092
+			memcpy(&newElements[0], &line->elements[0],
903092
+			       sizeof (newElements[0]));
903092
+			newElements[1].item =
903092
+				strndup(line->elements[1].item, l);
903092
+			newElements[1].indent = "=";
903092
+			*(eq++) = '\0';
903092
+			newElements[2].item = strdup(eq);
903092
+			free(line->elements[1].item);
903092
+			if (line->elements[1].indent)
903092
+				newElements[2].indent = line->elements[1].indent;
903092
+			for (int i = 2; i < line->numElements; i++) {
903092
+				newElements[i+1].item = line->elements[i].item;
903092
+				newElements[i+1].indent =
903092
+					line->elements[i].indent;
903092
+			}
903092
+			free(line->elements);
903092
+			line->elements = newElements;
903092
+			line->numElements = numElements;
903092
 		}
903092
 	}
903092
 
903092
@@ -1272,8 +1331,8 @@ static struct grubConfig *readConfig(const char *inName,
903092
 			    getKeywordByType(LT_DEFAULT, cfi);
903092
 			if (kwType && line->numElements == 3
903092
 			    && !strcmp(line->elements[1].item, kwType->key)
903092
-			    && !is_special_grub2_variable(line->elements[2].
903092
-							  item)) {
903092
+			    && !is_special_grub2_variable(
903092
+						line->elements[2].item)) {
903092
 				dbgPrintf("Line sets default config\n");
903092
 				cfg->flags &= ~GRUB_CONFIG_NO_DEFAULT;
903092
 				defaultLine = line;
903092
@@ -1529,16 +1588,33 @@ static struct grubConfig *readConfig(const char *inName,
903092
 				}
903092
 			}
903092
 		} else if (cfi->defaultIsVariable) {
903092
-			char *value = defaultLine->elements[2].item;
903092
-			while (*value && (*value == '"' || *value == '\'' ||
903092
-					  *value == ' ' || *value == '\t'))
903092
-				value++;
903092
-			cfg->defaultImage = strtol(value, &end, 10);
903092
-			while (*end && (*end == '"' || *end == '\'' ||
903092
-					*end == ' ' || *end == '\t'))
903092
-				end++;
903092
-			if (*end)
903092
-				cfg->defaultImage = -1;
903092
+			if (defaultLine->numElements == 2) {
903092
+				char *value = defaultLine->elements[1].item + 8;
903092
+				while (*value && (*value == '"' ||
903092
+						  *value == '\'' ||
903092
+						  *value == ' ' ||
903092
+						  *value == '\t'))
903092
+					value++;
903092
+				cfg->defaultImage = strtol(value, &end, 10);
903092
+				while (*end && (*end == '"' || *end == '\'' ||
903092
+						*end == ' ' || *end == '\t'))
903092
+					end++;
903092
+				if (*end)
903092
+					cfg->defaultImage = -1;
903092
+			} else if (defaultLine->numElements == 3) {
903092
+				char *value = defaultLine->elements[2].item;
903092
+				while (*value && (*value == '"' ||
903092
+						  *value == '\'' ||
903092
+						  *value == ' ' ||
903092
+						  *value == '\t'))
903092
+					value++;
903092
+				cfg->defaultImage = strtol(value, &end, 10);
903092
+				while (*end && (*end == '"' || *end == '\'' ||
903092
+						*end == ' ' || *end == '\t'))
903092
+					end++;
903092
+				if (*end)
903092
+					cfg->defaultImage = -1;
903092
+			}
903092
 		} else if (cfi->defaultSupportSaved &&
903092
 			   !strncmp(defaultLine->elements[1].item, "saved",
903092
 				    5)) {
903092
diff --git a/test.sh b/test.sh
903092
index c2a66e2..9e9be23 100755
903092
--- a/test.sh
903092
+++ b/test.sh
903092
@@ -542,6 +542,14 @@ if [ "$testgrub2" == "y" ]; then
903092
             ;;
903092
         esac
903092
 
903092
+    # a grub2 add with a "set" of the form: set foo="bar=1,2".  bz#1152550
903092
+    # has this being emitted as: set foo="bar=1,2"=1,2"
903092
+    # which is wrong.
903092
+    grub2Test grub2.16 add/g2-1.16 \
903092
+        --add-kernel=/boot/vmlinuz-foo \
903092
+        --copy-default --title 'Red Hat Enterprise Linux Server' \
903092
+        --args=root=/dev/mapper/foo--
903092
+
903092
     testing="GRUB2 add initrd"
903092
     grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
903092
         --initrd=/boot/new-initrd --boot-filesystem=/boot/
903092
diff --git a/test/grub2.16 b/test/grub2.16
903092
new file mode 100644
903092
index 0000000..136880a
903092
--- /dev/null
903092
+++ b/test/grub2.16
903092
@@ -0,0 +1,156 @@
903092
+#
903092
+# DO NOT EDIT THIS FILE
903092
+#
903092
+# It is automatically generated by grub2-mkconfig using templates
903092
+# from /etc/grub.d and settings from /etc/default/grub
903092
+#
903092
+
903092
+### BEGIN /etc/grub.d/00_header ###
903092
+set pager=1
903092
+
903092
+if [ -s $prefix/grubenv ]; then
903092
+  load_env
903092
+fi
903092
+if [ "${next_entry}" ] ; then
903092
+   set default="${next_entry}"
903092
+   set next_entry=
903092
+   save_env next_entry
903092
+   set boot_once=true
903092
+else
903092
+   set default="${saved_entry}"
903092
+fi
903092
+
903092
+if [ x"${feature_menuentry_id}" = xy ]; then
903092
+  menuentry_id_option="--id"
903092
+else
903092
+  menuentry_id_option=""
903092
+fi
903092
+
903092
+export menuentry_id_option
903092
+
903092
+if [ "${prev_saved_entry}" ]; then
903092
+  set saved_entry="${prev_saved_entry}"
903092
+  save_env saved_entry
903092
+  set prev_saved_entry=
903092
+  save_env prev_saved_entry
903092
+  set boot_once=true
903092
+fi
903092
+
903092
+function savedefault {
903092
+  if [ -z "${boot_once}" ]; then
903092
+    saved_entry="${chosen}"
903092
+    save_env saved_entry
903092
+  fi
903092
+}
903092
+
903092
+function load_video {
903092
+  if [ x$feature_all_video_module = xy ]; then
903092
+    insmod all_video
903092
+  else
903092
+    insmod efi_gop
903092
+    insmod efi_uga
903092
+    insmod ieee1275_fb
903092
+    insmod vbe
903092
+    insmod vga
903092
+    insmod video_bochs
903092
+    insmod video_cirrus
903092
+  fi
903092
+}
903092
+
903092
+serial --speed=115200
903092
+terminal_input serial console
903092
+terminal_output serial console
903092
+if [ x$feature_timeout_style = xy ] ; then
903092
+  set timeout_style=menu
903092
+  set timeout=5
903092
+# Fallback normal timeout code in case the timeout_style feature is
903092
+# unavailable.
903092
+else
903092
+  set timeout=5
903092
+fi
903092
+### END /etc/grub.d/00_header ###
903092
+
903092
+### BEGIN /etc/grub.d/00_tuned ###
903092
+set tuned_params="isolcpus=1,3"
903092
+### END /etc/grub.d/00_tuned ###
903092
+
903092
+### BEGIN /etc/grub.d/01_users ###
903092
+if [ -f ${prefix}/user.cfg ]; then
903092
+  source ${prefix}/user.cfg
903092
+  if [ -n ${GRUB2_PASSWORD} ]; then
903092
+    set superusers="root"
903092
+    export superusers
903092
+    password_pbkdf2 root ${GRUB2_PASSWORD}
903092
+  fi
903092
+fi
903092
+### END /etc/grub.d/01_users ###
903092
+
903092
+### BEGIN /etc/grub.d/10_linux ###
903092
+menuentry 'Red Hat Enterprise Linux Server (3.10.0-297.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-296.el7.x86_64-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-3.10.0-297.el7.x86_64 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params LANG=en_US.UTF-8
903092
+}
903092
+menuentry 'Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-296.el7.x86_64-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-3.10.0-296.el7.x86_64 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params
903092
+	initrd16 /initramfs-3.10.0-296.el7.x86_64.img
903092
+}
903092
+menuentry 'Red Hat Enterprise Linux Server (0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params
903092
+	initrd16 /initramfs-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7.img
903092
+}
903092
+if [ "x$default" = 'Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)' ]; then default='Advanced options for Red Hat Enterprise Linux Server>Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)'; fi;
903092
+### END /etc/grub.d/10_linux ###
903092
+
903092
+### BEGIN /etc/grub.d/20_linux_xen ###
903092
+### END /etc/grub.d/20_linux_xen ###
903092
+
903092
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
903092
+### END /etc/grub.d/20_ppc_terminfo ###
903092
+
903092
+### BEGIN /etc/grub.d/30_os-prober ###
903092
+### END /etc/grub.d/30_os-prober ###
903092
+
903092
+### BEGIN /etc/grub.d/40_custom ###
903092
+# This file provides an easy way to add custom menu entries.  Simply type the
903092
+# menu entries you want to add after this comment.  Be careful not to change
903092
+# the 'exec tail' line above.
903092
+### END /etc/grub.d/40_custom ###
903092
+
903092
+### BEGIN /etc/grub.d/41_custom ###
903092
+if [ -f  ${config_directory}/custom.cfg ]; then
903092
+  source ${config_directory}/custom.cfg
903092
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
903092
+  source $prefix/custom.cfg;
903092
+fi
903092
+### END /etc/grub.d/41_custom ###
903092
diff --git a/test/results/add/g2-1.16 b/test/results/add/g2-1.16
903092
new file mode 100644
903092
index 0000000..fc98757
903092
--- /dev/null
903092
+++ b/test/results/add/g2-1.16
903092
@@ -0,0 +1,170 @@
903092
+#
903092
+# DO NOT EDIT THIS FILE
903092
+#
903092
+# It is automatically generated by grub2-mkconfig using templates
903092
+# from /etc/grub.d and settings from /etc/default/grub
903092
+#
903092
+
903092
+### BEGIN /etc/grub.d/00_header ###
903092
+set pager=1
903092
+
903092
+if [ -s $prefix/grubenv ]; then
903092
+  load_env
903092
+fi
903092
+if [ "${next_entry}" ] ; then
903092
+   set default="${next_entry}"
903092
+   set next_entry=
903092
+   save_env next_entry
903092
+   set boot_once=true
903092
+else
903092
+   set default="${saved_entry}"
903092
+fi
903092
+
903092
+if [ x"${feature_menuentry_id}" = xy ]; then
903092
+  menuentry_id_option="--id"
903092
+else
903092
+  menuentry_id_option=""
903092
+fi
903092
+
903092
+export menuentry_id_option
903092
+
903092
+if [ "${prev_saved_entry}" ]; then
903092
+  set saved_entry="${prev_saved_entry}"
903092
+  save_env saved_entry
903092
+  set prev_saved_entry=
903092
+  save_env prev_saved_entry
903092
+  set boot_once=true
903092
+fi
903092
+
903092
+function savedefault {
903092
+  if [ -z "${boot_once}" ]; then
903092
+    saved_entry="${chosen}"
903092
+    save_env saved_entry
903092
+  fi
903092
+}
903092
+
903092
+function load_video {
903092
+  if [ x$feature_all_video_module = xy ]; then
903092
+    insmod all_video
903092
+  else
903092
+    insmod efi_gop
903092
+    insmod efi_uga
903092
+    insmod ieee1275_fb
903092
+    insmod vbe
903092
+    insmod vga
903092
+    insmod video_bochs
903092
+    insmod video_cirrus
903092
+  fi
903092
+}
903092
+
903092
+serial --speed=115200
903092
+terminal_input serial console
903092
+terminal_output serial console
903092
+if [ x$feature_timeout_style = xy ] ; then
903092
+  set timeout_style=menu
903092
+  set timeout=5
903092
+# Fallback normal timeout code in case the timeout_style feature is
903092
+# unavailable.
903092
+else
903092
+  set timeout=5
903092
+fi
903092
+### END /etc/grub.d/00_header ###
903092
+
903092
+### BEGIN /etc/grub.d/00_tuned ###
903092
+set tuned_params="isolcpus=1,3"
903092
+### END /etc/grub.d/00_tuned ###
903092
+
903092
+### BEGIN /etc/grub.d/01_users ###
903092
+if [ -f ${prefix}/user.cfg ]; then
903092
+  source ${prefix}/user.cfg
903092
+  if [ -n ${GRUB2_PASSWORD} ]; then
903092
+    set superusers="root"
903092
+    export superusers
903092
+    password_pbkdf2 root ${GRUB2_PASSWORD}
903092
+  fi
903092
+fi
903092
+### END /etc/grub.d/01_users ###
903092
+
903092
+### BEGIN /etc/grub.d/10_linux ###
903092
+menuentry 'Red Hat Enterprise Linux Server' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-296.el7.x86_64-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-foo root=/dev/mapper/foo-- ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params LANG=en_US.UTF-8
903092
+}
903092
+menuentry 'Red Hat Enterprise Linux Server (3.10.0-297.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-296.el7.x86_64-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-3.10.0-297.el7.x86_64 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params LANG=en_US.UTF-8
903092
+}
903092
+menuentry 'Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-296.el7.x86_64-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-3.10.0-296.el7.x86_64 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params
903092
+	initrd16 /initramfs-3.10.0-296.el7.x86_64.img
903092
+}
903092
+menuentry 'Red Hat Enterprise Linux Server (0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7-advanced-ae7b3742-9092-4432-9f7f-8abdbf0dc3db' {
903092
+	load_video
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod xfs
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  cae02b39-f239-4d26-9032-674d261c93d8
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root cae02b39-f239-4d26-9032-674d261c93d8
903092
+	fi
903092
+	linux16 /vmlinuz-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7 root=/dev/mapper/rhel_hp--dl380pgen8--02--vm--10-root ro crashkernel=auto rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/root rd.lvm.lv=rhel_hp-dl380pgen8-02-vm-10/swap console=ttyS0,115200n81  $tuned_params
903092
+	initrd16 /initramfs-0-rescue-cc21b92886f9ebbd3ed5a494639b7fd7.img
903092
+}
903092
+if [ "x$default" = 'Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)' ]; then default='Advanced options for Red Hat Enterprise Linux Server>Red Hat Enterprise Linux Server (3.10.0-296.el7.x86_64) 7.2 (Maipo)'; fi;
903092
+### END /etc/grub.d/10_linux ###
903092
+
903092
+### BEGIN /etc/grub.d/20_linux_xen ###
903092
+### END /etc/grub.d/20_linux_xen ###
903092
+
903092
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
903092
+### END /etc/grub.d/20_ppc_terminfo ###
903092
+
903092
+### BEGIN /etc/grub.d/30_os-prober ###
903092
+### END /etc/grub.d/30_os-prober ###
903092
+
903092
+### BEGIN /etc/grub.d/40_custom ###
903092
+# This file provides an easy way to add custom menu entries.  Simply type the
903092
+# menu entries you want to add after this comment.  Be careful not to change
903092
+# the 'exec tail' line above.
903092
+### END /etc/grub.d/40_custom ###
903092
+
903092
+### BEGIN /etc/grub.d/41_custom ###
903092
+if [ -f  ${config_directory}/custom.cfg ]; then
903092
+  source ${config_directory}/custom.cfg
903092
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
903092
+  source $prefix/custom.cfg;
903092
+fi
903092
+### END /etc/grub.d/41_custom ###
903092
-- 
903092
2.4.3
903092