Accepting request 527630 from home:mlatimer:branches:Base:System

- Use /boot/<arch>/loader/linux to determine if install media
  is SUSE instead of /contents file (bsc#1054453)

OBS-URL: https://build.opensuse.org/request/show/527630
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=279
This commit is contained in:
Michael Chang 2017-09-21 01:25:53 +00:00 committed by Git OBS Bridge
parent 4cd016df9e
commit 72c330459f
2 changed files with 28 additions and 21 deletions

View File

@ -36,10 +36,19 @@ if [ "${grub_cpu}" = "x86_64" ]; then
fi
set suse_cddev=""
search -s suse_cddev_content -f "/content"
search -s suse_cddev_product -f "/media.1/products"
if [ -n "${suse_cddev_content}" -a -n "${suse_cddev_product}" -a "${suse_cddev_content}" = "${suse_cddev_product}" ]; then
set suse_cddev="${suse_cddev_content}"
if [ "${grub_cpu}" = "i386" ]; then
set suse_cdarch="i586"
else
set suse_cdarch="${grub_cpu}"
fi
if [ -n "${suse_cdarch}" ]; then
set suse_kern="/boot/${suse_cdarch}/loader/linux"
set suse_initrd="/boot/${suse_cdarch}/loader/initrd"
search -s suse_cdkern -f "${suse_kern}"
search -s suse_cdinitrd -f "${suse_initrd}"
if [ -n "${suse_cdkern}" -a -n "${suse_cdinitrd}" -a "${suse_cdkern}" = "${suse_cdinitrd}" ]; then
set suse_cddev="${suse_cdkern}"
fi
fi
set hdcfg_list="\
@ -115,38 +124,30 @@ if [ -n "${fedora_cddev}" ]; then
fi
if [ -n "${suse_cddev}" ]; then
if [ "${grub_cpu}" = "i386" ]; then
set suse_cdarch="i586"
else
set suse_cdarch="${grub_cpu}"
fi
set timeout=8
set root="${suse_cddev}"
set suse_cdcfg="/boot/${suse_cdarch}/grub2-xen/grub.cfg"
if [ -e "/boot/${suse_cdarch}/vmlinuz-xen" ]; then
set suse_cdkern="/boot/${suse_cdarch}/vmlinuz-xen"
set suse_cdinitrd="/boot/${suse_cdarch}/initrd-xen"
else
set suse_cdkern="/boot/${suse_cdarch}/loader/linux"
set suse_cdinitrd="/boot/${suse_cdarch}/loader/initrd"
set suse_kern="/boot/${suse_cdarch}/vmlinuz-xen"
set suse_initrd="/boot/${suse_cdarch}/initrd-xen"
fi
if [ -f "${suse_cdcfg}" ]; then
menuentry "${suse_cddev} SUSE Install menu" {
set root="${suse_cddev}"
configfile "${suse_cdcfg}"
}
elif [ -f "${suse_cdkern}" -a -f "$suse_cdinitrd" ]; then
elif [ -f "${suse_kern}" -a -f "$suse_initrd" ]; then
menuentry "${suse_cddev} SUSE Install" {
linux "${suse_cdkern}" linemode=1 xencons=hvc0
initrd "${suse_cdinitrd}"
linux "${suse_kern}" linemode=1 xencons=hvc0
initrd "${suse_initrd}"
}
menuentry "${suse_cddev} SUSE Rescue" {
linux "${suse_cdkern}" linemode=1 xencons=hvc0 rescue=1
initrd "${suse_cdinitrd}"
linux "${suse_kern}" linemode=1 xencons=hvc0 rescue=1
initrd "${suse_initrd}"
}
menuentry "${suse_cddev} SUSE Upgrade" {
linux "${suse_cdkern}" linemode=1 xencons=hvc0 upgrade=1
initrd "${suse_cdinitrd}"
linux "${suse_kern}" linemode=1 xencons=hvc0 upgrade=1
initrd "${suse_initrd}"
}
else
echo "the device ${suse_cddev} is not xen pv bootable"

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 20 22:17:10 UTC 2017 - mlatimer@suse.com
- Use /boot/<arch>/loader/linux to determine if install media
is SUSE instead of /contents file (bsc#1054453)
-------------------------------------------------------------------
Tue Sep 19 22:52:45 UTC 2017 - mlatimer@suse.com