Accepting request 228324 from home:michael-chang:branches:devel:openSUSE:Factory
- snapper rollback support (fate#317062) - refresh shim-install OBS-URL: https://build.opensuse.org/request/show/228324 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=69
This commit is contained in:
parent
58137361ad
commit
062d82ccf6
55
shim-install
55
shim-install
@ -227,16 +227,65 @@ if test "$update_boot" = "yes"; then
|
||||
cp "${source_dir}/fallback.efi" "${efibootdir}"
|
||||
fi
|
||||
|
||||
|
||||
make_grubcfg () {
|
||||
|
||||
grub_cfg_dirname=`dirname $grub_cfg`
|
||||
grub_cfg_basename=`basename $grub_cfg`
|
||||
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
|
||||
|
||||
(cat << EOF
|
||||
if test "x$SUSE_BTRFS_SNAPSHOT_BOOTING" = "xtrue" &&
|
||||
test "x$root_fstype" = "xbtrfs" &&
|
||||
test "x$boot_fstype" = "xbtrfs"; then
|
||||
|
||||
cat <<EOF
|
||||
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
|
||||
|
||||
else
|
||||
|
||||
cat <<EOF
|
||||
search --fs-uuid --set=root ${cfg_fs_uuid}
|
||||
set prefix=(\${root})`${grub_mkrelpath} ${grub_cfg_dirname}`
|
||||
configfile \$prefix/${grub_cfg_basename}
|
||||
EOF
|
||||
echo "configfile \$prefix/${grub_cfg_basename}") \
|
||||
> "${efidir}/grub.cfg"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
make_grubcfg > "${efidir}/grub.cfg"
|
||||
|
||||
efibootmgr="`which efibootmgr`"
|
||||
if test "$removable" = no && test -n "$bootloader_id" && test -n "$efibootmgr"; then
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 31 11:57:13 UTC 2014 - mchang@suse.com
|
||||
|
||||
- snapper rollback support (fate#317062)
|
||||
- refresh shim-install
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 13 02:32:15 UTC 2014 - glin@suse.com
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user