]> xenbits.xensource.com Git - people/aperard/centos-package-xen.git/commitdiff
Run grub-bootxen.sh on xen-hypervisor install
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Mon, 10 Aug 2015 16:59:34 +0000 (17:59 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Mon, 10 Aug 2015 16:59:34 +0000 (17:59 +0100)
SPECS/xen.spec

index fcb5f67e11594d14c4bcb5f9eac32d42413cbec7..e1fb176aecf826d9ee701d703a92fae4fbcf51ce 100644 (file)
@@ -19,7 +19,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 4.4.2
-Release: 7%{?dist}
+Release: 8%{?dist}
 Group:   Development/Libraries
 License: GPLv2+ and LGPLv2+ and BSD
 URL:     http://xen.org/
@@ -569,13 +569,19 @@ fi
 %postun libs -p /sbin/ldconfig
 
 %post hypervisor
-if [ $1 = 1 -a -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
-  /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
+if [ $1 = 1 ] ; then
+    if [ -f %{_bindir}/grub-bootxen.sh ]; then
+       %{_bindir}/grub-bootxen.sh
+    elif [ -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
+       /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
+    fi
 fi
 
-%postun hypervisor
-if [ -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
-  /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
+%postuninstall hypervisor
+if [ -f %{_bindir}/grub-bootxen.sh ]; then
+    %{_bindir}/grub-bootxen.sh
+elif [ -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
+    /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
 fi
 
 %clean
@@ -830,6 +836,9 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
+* Mon Aug 03 2015 George Dunlap <george.dunlap@eu.citrix.com> - 4.4.2-8.el6.centos
+ - Run grub-bootxen.sh on hypervisor post (un)install
+
 * Thu Jul 30 2015 George Dunlap <george.dunlap@eu.citrix.com> - 4.4.2-7.el6.centos
  - Import XSA-139
  - Import XSA-140