diff options
author | Richard Yao <ryao@gentoo.org> | 2013-02-04 17:29:22 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2013-02-04 17:29:22 +0000 |
commit | e63d5738aa6090cfdf4f5b023706fd4247fab49e (patch) | |
tree | 89847969e6671217a90d393b0ff2b1e36e2a38ae /sys-boot/grub | |
parent | Version bump wrt bug #455322. Remove old. (diff) | |
download | gentoo-2-e63d5738aa6090cfdf4f5b023706fd4247fab49e.tar.gz gentoo-2-e63d5738aa6090cfdf4f5b023706fd4247fab49e.tar.bz2 gentoo-2-e63d5738aa6090cfdf4f5b023706fd4247fab49e.zip |
Warn people using ZFS that grub2-install needs to be run to properly support feature flags.
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-boot/grub')
-rw-r--r-- | sys-boot/grub/ChangeLog | 6 | ||||
-rw-r--r-- | sys-boot/grub/grub-2.00-r2.ebuild | 16 |
2 files changed, 20 insertions, 2 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index 9fc44065a2db..dfb5220054cf 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-boot/grub # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.250 2013/02/03 22:39:46 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.251 2013/02/04 17:29:22 ryao Exp $ + + 04 Feb 2013; Richard Yao <ryao@gentoo.org> grub-2.00-r2.ebuild: + Warn people using ZFS that grub2-install needs to be run to properly support + feature flags. 03 Feb 2013; Mike Gilbert <floppym@gentoo.org> grub-2.00-r2.ebuild: Restore keywords after testing. diff --git a/sys-boot/grub/grub-2.00-r2.ebuild b/sys-boot/grub/grub-2.00-r2.ebuild index d8bc8a96c7e9..0df6651db8e4 100644 --- a/sys-boot/grub/grub-2.00-r2.ebuild +++ b/sys-boot/grub/grub-2.00-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r2.ebuild,v 1.2 2013/02/03 22:39:46 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r2.ebuild,v 1.3 2013/02/04 17:29:22 ryao Exp $ EAPI=4 @@ -331,6 +331,12 @@ src_install() { newins "${FILESDIR}"/grub.default-2 grub } +pkg_preinst() { + has_version "<sys-boot/grub-2.00-r2:2" && \ + [[ "$(df -TP /boot | awk 'NR>1{print $2}')" = 'zfs' ]] + display_zfs_feature_flag_warning=$? +} + pkg_postinst() { # display the link to guide elog "For information on how to configure grub-2 please refer to the guide:" @@ -346,4 +352,12 @@ pkg_postinst() { ewarn "the following to add sys-boot/grub:0 to your world file." ewarn "emerge --noreplace sys-boot/grub:0" fi + if [[ $display_zfs_feature_flag_warning -eq 0 ]]; then + zfs_pool=$(df -TP /boot | awk 'NR>1{print $1}') + zfs_pool=${zfs_pool%%/*} + ewarn "The previous version of sys-boot/grub lacked support for ZFS feature flags." + ewarn "Your /boot is on ZFS. Running \"zpool upgrade ${zfs_pool}\" or \"zpool upgrade -a\"" + ewarn "to upgrade your pool to support feature flags will prevent your system from booting." + ewarn "You should use grub2-install to reinstall your boot code. This will avoid problems." + fi } |