cf7b25968b
ensuring grub2-snapper-plugin is installed when both snapper and grub2-common are installed (bsc#1231271) - Fix OOM error in loading loopback file (bsc#1230840) * 0001-tpm-Skip-loopback-image-measurement.patch - Fix UEFI PXE boot failure on tagged VLAN network (bsc#1230263) * 0001-efinet-Skip-virtual-VLAN-devices-during-card-enumera.patch - Fix grub screen is filled with artifects from earlier post menu (bsc#1224465) * grub2-SUSE-Add-the-t-hotkey.patch * 0001-fix-grub-screen-filled-with-post-screen-artifects.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=516
29 lines
937 B
Bash
29 lines
937 B
Bash
#! /bin/sh
|
|
set -e
|
|
SNAPSHOTS="/.snapshots"
|
|
if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] &&
|
|
[ "x${GRUB_FS}" = "xbtrfs" ] &&
|
|
[ -d "${SNAPSHOTS}" ]; then
|
|
machine=`uname -m`
|
|
case "x$machine" in
|
|
xs390 | xs390x) : ;;
|
|
*)
|
|
SNAPSHOT_RID=`btrfs inspect-internal rootid ${SNAPSHOTS}`
|
|
ROOT_RID=`btrfs inspect-internal rootid /`
|
|
if [ -n "${SNAPSHOT_RID}" -a "${SNAPSHOT_RID}" != "${ROOT_RID}" ]; then
|
|
SNAPSHOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${SNAPSHOT_RID} /`
|
|
ROOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${ROOT_RID} /`
|
|
INODE=`stat -c '%i' ${SNAPSHOTS}`
|
|
if [ "x${INODE}" = "x256" -a "x${ROOT_SUBVOL}${SNAPSHOTS}" != "x${SNAPSHOT_SUBVOL}" ]; then
|
|
echo "btrfs-mount-subvol (\$root) ${SNAPSHOTS} ${SNAPSHOT_SUBVOL}"
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|
|
cat <<EOF
|
|
if [ -f "${SNAPSHOTS}/grub-snapshot.cfg" ]; then
|
|
source "${SNAPSHOTS}/grub-snapshot.cfg"
|
|
fi
|
|
EOF
|
|
fi
|