grub2/grub2-snapper-plugin.sh

258 lines
6.0 KiB
Bash
Raw Normal View History

#!/bin/sh
set -e
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
grub_mkconfig="/usr/sbin/grub2-mkconfig"
grub_mkrelpath="/usr/bin/grub2-mkrelpath"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
grub_script_check="/usr/bin/grub2-script-check"
grub_setting="/etc/default/grub"
grub_cfg="/boot/grub2/grub.cfg"
grub_snapshot_cfg="/boot/grub2/snapshot_submenu.cfg"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapper_snapshot_path="/.snapshots"
snapshot_submenu_name="snapshot_submenu.cfg"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapper_snapshots_cfg="${snapper_snapshot_path}/snapshot_submenu.cfg"
case x"`uname -m`" in
x"powerpc"* | x"ppc"*)
target="powerpc-ieee1275";;
x"sparc"*)
target="sparc64-ieee1275";;
x"mips"*"el")
target="mipsel-loongson";;
x"mips"*)
target="mips-arc";;
x"ia64"*)
target="ia64-efi";;
x"x86_64"* | x"amd64"*)
modprobe -q efivars 2>/dev/null || true
if [ -d /sys/firmware/efi ]; then
target="x86_64-efi"
else
target=i386-pc
fi
;;
x"i"?"86"*)
modprobe -q efivars 2>/dev/null || true
if [ -d /sys/firmware/efi ]; then
target="i386-efi"
elif [ -e /proc/device-tree ]; then
target=i386-pc
for x in /proc/device-tree/*; do
if [ -e "$x" ]; then
target="i386-ieee1275"
fi
done
else
target=i386-pc
fi
;;
*)
target=""
;;
esac
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if [ "x${target}" != "xi386-pc" ] &&
[ "x${target}" != "xx86_64-efi" ] &&
[ "x${target}" != "xi386-efi" ]; then
exit 0;
fi
snapshot_submenu_refresh () {
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
for s_dir in ${snapper_snapshot_path}/*; do
snapshot="${s_dir}/snapshot"
snapper_cfg="${s_dir}/${snapshot_submenu_name}"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
num="`basename $s_dir`"
if [ ! -d "$snapshot" ]; then
rm -f "${snapper_cfg}"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
rmdir "$s_dir" 2>/dev/null || true
continue
fi
# bnc#864842 Important snapshots are not marked as such in grub2 menu
# the format is "important distribution version (kernel_version, timestamp, pre/post)"
date=`xmllint --xpath '/snapshot/date/text()' "${s_dir}/info.xml" || echo ""`
date=`echo $date | sed 's/\(.*\) \(.*\):.*/\1,\2/'`
important=`xmllint --xpath "/snapshot/userdata[key='important']/value/text()" "${s_dir}/info.xml" || echo ""`
stype=`xmllint --xpath '/snapshot/type/text()' "${s_dir}/info.xml" || echo ""`
kernel_ver=`readlink /boot/vmlinuz | sed 's/vmlinuz-\([^-]*\).*/\1/'`
eval `cat ${snapshot}/etc/os-release`
test "$important" = "yes" && important="*" || important=""
test "$stype" = "single" && stype=""
if test -n "$stype"; then
title="${important}${NAME} $VERSION ($kernel_ver,$date,$stype)"
else
title="${important}${NAME} $VERSION ($kernel_ver,$date)"
fi
cat <<EOF > "${snapper_cfg}.new"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if [ -f "${snapper_snapshot_path}/$num/snapshot/boot/grub2/grub.cfg" ]; then
snapshot_found=true
saved_subvol=\$btrfs_subvol
menuentry "$title" "${snapper_snapshot_path}/$num/snapshot" "`$grub_mkrelpath ${snapper_snapshot_path}/${num}/snapshot`" {
btrfs_subvol="\$2"
extra_cmdline="rootflags=subvol=\$3"
configfile /boot/grub2/grub.cfg
btrfs_subvol=\$saved_subvol
}
fi
EOF
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if ${grub_script_check} "${snapper_cfg}.new"; then
mv -f "${snapper_cfg}.new" "${snapper_cfg}"
fi
done
}
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapper_snapshots_cfg_refresh () {
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if [ ! -d "$snapper_snapshot_path" ]; then
return
fi
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
for s_dir in ${snapper_snapshot_path}/*; do
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapshot="${s_dir}/snapshot"
snapper_cfg="${s_dir}/${snapshot_submenu_name}"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if [ -f "${snapper_cfg}" ]; then
cs="${s_dir}\n${cs}"
continue
fi
done
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
for c in `echo -e "${cs}" | sort -V`; do
snapshot_cfg="\
if [ -f "$c/snapshot_submenu.cfg" ]; then
source "$c/snapshot_submenu.cfg"
fi
${snapshot_cfg}"
done
cat <<EOF >"${snapper_snapshots_cfg}.new"
submenu "Bootable snapshots" {
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
${snapshot_cfg}
if [ x\$snapshot_found != xtrue ]; then
submenu "Not Found" {true}
fi
}
EOF
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if ${grub_script_check} "${snapper_snapshots_cfg}.new"; then
mv -f "${snapper_snapshots_cfg}.new" "${snapper_snapshots_cfg}"
fi
}
snapshot_submenu_clean () {
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
for s_dir in ${snapper_snapshot_path}/*; do
snapper_cfg="${s_dir}/${snapshot_submenu_name}"
if [ -f "$snapper_cfg" ]; then
rm -f "$snapper_cfg"
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
rmdir "$s_dir" 2>/dev/null || true
fi
done
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
if [ -f "${snapper_snapshot_path}/${snapshot_submenu_name}" ]; then
rm -f "${snapper_snapshot_path}/${snapshot_submenu_name}"
fi
}
set_grub_setting () {
name=$1
val=$2
if grep -q "$name" "$grub_setting"; then
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
sed -i -e "s!.*\($name\)=.*!\1=\"$val\"!" "$grub_setting"
else
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
echo "$name=\"$val\"" >> "$grub_setting"
fi
}
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
enable_grub_settings () {
set_grub_setting SUSE_BTRFS_SNAPSHOT_BOOTING "true"
}
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
disable_grub_settings () {
set_grub_setting SUSE_BTRFS_SNAPSHOT_BOOTING "false"
}
update_grub () {
"${grub_mkconfig}" -o "${grub_cfg}"
}
# Check the arguments.
while test $# -gt 0
do
option=$1
shift
case "$option" in
-e | --enable)
opt_enable=true
;;
-d | --disable)
opt_enable=false
;;
-r | --refresh)
opt_refresh=true
;;
-c | --clean)
opt_clean=true
;;
-*)
;;
esac
done
if [ "x${opt_enable}" = "xtrue" ]; then
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
#enable_grub_settings
#update_grub
snapshot_submenu_refresh
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapper_snapshots_cfg_refresh
elif [ "x${opt_enable}" = "xfalse" ]; then
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
#disable_grub_settings
update_grub
snapshot_submenu_clean
fi
if [ x${opt_refresh} = "xtrue" ]; then
snapshot_submenu_refresh
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00
snapper_snapshots_cfg_refresh
fi
if [ x${opt_clean} = "xtrue" ]; then
snapshot_submenu_clean
fi
Accepting request 228323 from home:michael-chang:SLE12 - snapper rollback support (fate#317062) * add btrfs_follow_default.patch * add suse_btrfs_grub2_install.sh * add 80_suse_btrfs_snapshot * refresh grub2-snapper-plugin.sh - add grub2-x86_64-xen subpackage (bnc#863821) - ieee1275: check for IBM pseries emulated machine (bnc#869964) - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Build ppc64 as 32bit - added patches: * grub2-ppc64-build-ppc64-32bit.patch - Rename PowerPC patches so it will have architecture in it's name - added patches: * grub2-ppc64le-01-Add-Little-Endian-support-for-Power64-to-the-build.patch * grub2-ppc64le-02-Build-grub-as-O1-until-we-add-savegpr-and-restgpr-ro.patch * grub2-ppc64le-03-disable-creation-of-vsx-and-altivec-instructions.patch * grub2-ppc64le-04-powerpc64-LE-s-linker-knows-how-to-handle-the-undefi.patch * grub2-ppc64le-05-grub-install-can-now-recognize-and-install-a-LE-grub.patch * grub2-ppc64le-06-set-the-ABI-version-to-0x02-in-the-e_flag-of-the-PPC.patch * grub2-ppc64le-07-Add-IEEE1275_ADDR-helper.patch * grub2-ppc64le-08-Fix-some-more-warnings-when-casting.patch * grub2-ppc64le-09-Add-powerpc64-types.patch * grub2-ppc64le-10-powerpc64-is-not-necessarily-BigEndian-anymore.patch * grub2-ppc64le-11-Fix-warnings-when-building-powerpc-linux-loader-64bi.patch * grub2-ppc64le-12-GRUB_ELF_R_PPC_-processing-is-applicable-only-for-32.patch OBS-URL: https://build.opensuse.org/request/show/228323 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=81
2014-03-31 21:51:24 +02:00