Accepting request 231974 from home:michael-chang:branches:devel:openSUSE:Factory
- shim-install: fix boot partition and rollback support kluge (bnc#875385) OBS-URL: https://build.opensuse.org/request/show/231974 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=74
This commit is contained in:
parent
fa8f2b475d
commit
2562b2ffce
45
shim-install
45
shim-install
@ -233,55 +233,20 @@ make_grubcfg () {
|
|||||||
grub_cfg_dirname=`dirname $grub_cfg`
|
grub_cfg_dirname=`dirname $grub_cfg`
|
||||||
grub_cfg_basename=`basename $grub_cfg`
|
grub_cfg_basename=`basename $grub_cfg`
|
||||||
cfg_fs_uuid=`"$grub_probe" --target=fs_uuid "$grub_cfg_dirname"`
|
cfg_fs_uuid=`"$grub_probe" --target=fs_uuid "$grub_cfg_dirname"`
|
||||||
descriptive_config="snapshot_submenu.cfg"
|
|
||||||
root_fstype=`$grub_probe -t fs /`
|
|
||||||
boot_fstype=`$grub_probe -t fs /boot`
|
|
||||||
if [ "x${root_fstype}" != "xbtrfs" ] ||
|
|
||||||
[ "x${boot_fstype}" != "xbtrfs" ]; then
|
|
||||||
echo "/ is not on btrfs" >&2
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$SUSE_BTRFS_SNAPSHOT_BOOTING" = "xtrue" &&
|
|
||||||
test "x$root_fstype" = "xbtrfs" &&
|
|
||||||
test "x$boot_fstype" = "xbtrfs"; then
|
|
||||||
|
|
||||||
|
if test "x$SUSE_BTRFS_SNAPSHOT_BOOTING" = "xtrue"; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
set btrfs_relative_path="yes"
|
set btrfs_relative_path="yes"
|
||||||
set extra_cmdline=""
|
|
||||||
btrfs_subvolid=""
|
|
||||||
btrfs_subvol="/"
|
|
||||||
|
|
||||||
export btrfs_relative_path
|
|
||||||
export extra_cmdline
|
|
||||||
|
|
||||||
search --fs-uuid --set=root ${cfg_fs_uuid}
|
|
||||||
|
|
||||||
set timeout=0
|
|
||||||
|
|
||||||
terminal_input console
|
|
||||||
terminal_output console
|
|
||||||
|
|
||||||
menuentry 'default' {
|
|
||||||
btrfs_subvol=""
|
|
||||||
configfile /boot/grub2/grub.cfg
|
|
||||||
btrfs_subvol="/"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -f "/.snapshots/${descriptive_config}" ]; then
|
|
||||||
source "/.snapshots/${descriptive_config}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
if ${grub_mkrelpath} --usage | grep -q -e '--relative'; then
|
||||||
else
|
grub_mkrelpath="${grub_mkrelpath} -r"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
search --fs-uuid --set=root ${cfg_fs_uuid}
|
search --fs-uuid --set=root ${cfg_fs_uuid}
|
||||||
set prefix=(\${root})`${grub_mkrelpath} ${grub_cfg_dirname}`
|
set prefix=(\${root})`${grub_mkrelpath} ${grub_cfg_dirname}`
|
||||||
configfile \$prefix/${grub_cfg_basename}
|
configfile \$prefix/${grub_cfg_basename}
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 29 07:38:11 UTC 2014 - mchang@suse.com
|
||||||
|
|
||||||
|
- shim-install: fix boot partition and rollback support kluge
|
||||||
|
(bnc#875385)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 10 08:20:20 UTC 2014 - glin@suse.com
|
Thu Apr 10 08:20:20 UTC 2014 - glin@suse.com
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user