diff --git a/mdadm.changes b/mdadm.changes index d780613..aac2ebd 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 20 08:00:33 UTC 2012 - rmilasan@suse.com + +- Run update of initrd at %post and %postun. + We need this to make sure initrd reflects the updates. + ------------------------------------------------------------------- Wed Dec 21 10:28:19 UTC 2011 - coolo@suse.com diff --git a/mdadm.spec b/mdadm.spec index 103657f..f4e34a3 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ # # spec file for package mdadm # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,11 +15,12 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: mdadm Version: 3.2.2 Release: 0 BuildRequires: sgmltool -PreReq: %fillup_prereq %insserv_prereq +PreReq: %fillup_prereq %insserv_prereq /sbin/mkinitrd Obsoletes: raidtools Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/ Summary: Utility for Configuring MD Setup @@ -71,6 +72,13 @@ install -m 644 udev-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d/64-md-raid.ru %post [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup +if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then + echo "Skipping recreation of existing initial ramdisks, due" + echo "to presence of /var/lib/no_initrd_recreation_by_suspend" +elif [ -x /sbin/mkinitrd ]; then + /sbin/mkinitrd +fi + %{fillup_and_insserv -y boot.md} mkdir -p /dev/.mdadm # replace the /var/run/mdadm directory (installed by sle11/11.1) with @@ -86,6 +94,13 @@ fi %postun %restart_on_update mdadmd [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup +if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then + echo "Skipping recreation of existing initial ramdisks, due" + echo "to presence of /var/lib/no_initrd_recreation_by_suspend" +elif [ -x /sbin/mkinitrd ]; then + /sbin/mkinitrd +fi + %{insserv_cleanup} %preun