forked from pool/grub2
Accepting request 910700 from home:seife:branches:Base:System
update grub2-systemd-sleep.sh to fix hibernation OBS-URL: https://build.opensuse.org/request/show/910700 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=389
This commit is contained in:
parent
8704ee74b5
commit
22ae84ab72
@ -121,6 +121,8 @@ grub-once-restore()
|
|||||||
# We need this, if more than one kernel is installed. This works reasonably
|
# We need this, if more than one kernel is installed. This works reasonably
|
||||||
# well with grub, if all kernels are named "vmlinuz-`uname -r`" and are
|
# well with grub, if all kernels are named "vmlinuz-`uname -r`" and are
|
||||||
# located in /boot. If they are not, good luck ;-)
|
# located in /boot. If they are not, good luck ;-)
|
||||||
|
# for 2021-style usrmerged kernels, the location in /usr/lib/modules/ \
|
||||||
|
# `uname -r`/vmlinuz is resolved to match...
|
||||||
find-kernel-entry()
|
find-kernel-entry()
|
||||||
{
|
{
|
||||||
NEXT_BOOT=""
|
NEXT_BOOT=""
|
||||||
@ -128,9 +130,14 @@ find-kernel-entry()
|
|||||||
# DEBUG "running kernel: $RUNNING" DIAG
|
# DEBUG "running kernel: $RUNNING" DIAG
|
||||||
while [ -n "${KERNELS[$I]}" ]; do
|
while [ -n "${KERNELS[$I]}" ]; do
|
||||||
BOOTING="${KERNELS[$I]}"
|
BOOTING="${KERNELS[$I]}"
|
||||||
if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
|
if IMAGE=$(readlink /boot/"$BOOTING"); then
|
||||||
# DEBUG "Found kernel symlink $BOOTING => $IMAGE" INFO
|
if [[ $IMAGE == */vmlinuz ]]; then # new usrmerged setup
|
||||||
BOOTING=$IMAGE
|
BOOTING=${IMAGE%/vmlinuz} # the directory name is what counts
|
||||||
|
BOOTING=${BOOTING##*/}
|
||||||
|
elif [ -e "/boot/${IMAGE##*/}" ]; then
|
||||||
|
# DEBUG "Found kernel symlink $BOOTING => $IMAGE" INFO
|
||||||
|
BOOTING=$IMAGE
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
BOOTING="${BOOTING#*${VMLINUZ}-}"
|
BOOTING="${BOOTING#*${VMLINUZ}-}"
|
||||||
if [ "$RUNNING" == "$BOOTING" -a -n "${MENU_ENTRIES[$I]}" ]; then
|
if [ "$RUNNING" == "$BOOTING" -a -n "${MENU_ENTRIES[$I]}" ]; then
|
||||||
@ -169,8 +176,13 @@ prepare-grub()
|
|||||||
# if there is no default entry (no menu.lst?) we fall back to
|
# if there is no default entry (no menu.lst?) we fall back to
|
||||||
# the default of /boot/${VMLINUZ}.
|
# the default of /boot/${VMLINUZ}.
|
||||||
[ -z "$BOOTING" ] && BOOTING="${VMLINUZ}"
|
[ -z "$BOOTING" ] && BOOTING="${VMLINUZ}"
|
||||||
if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
|
if IMAGE=$(readlink /boot/"$BOOTING"); then
|
||||||
BOOTING=$IMAGE
|
if [[ $IMAGE == */vmlinuz ]]; then # new usrmerged setup
|
||||||
|
BOOTING=${IMAGE%/vmlinuz} # the directory name is what counts
|
||||||
|
BOOTING=${BOOTING##*/}
|
||||||
|
elif [ -e "/boot/${IMAGE##*/}" ]; then
|
||||||
|
BOOTING=$IMAGE
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
BOOTING="${BOOTING#*${VMLINUZ}-}"
|
BOOTING="${BOOTING#*${VMLINUZ}-}"
|
||||||
echo "running kernel: '$RUNNING', probably booting kernel: '$BOOTING'"
|
echo "running kernel: '$RUNNING', probably booting kernel: '$BOOTING'"
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 4 10:28:49 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com>
|
||||||
|
|
||||||
|
- update grub2-systemd-sleep.sh to fix hibernation by avoiding the
|
||||||
|
error "no kernelfile matching the running kernel found" on
|
||||||
|
usrmerged setup
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 22 16:43:20 UTC 2021 - Petr Vorel <pvorel@suse.cz>
|
Thu Jul 22 16:43:20 UTC 2021 - Petr Vorel <pvorel@suse.cz>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user