Accepting request 114777 from Base:System

- Run update of initrd at %post and %postun.
  We need this to make sure initrd reflects the updates.

OBS-URL: https://build.opensuse.org/request/show/114777
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=66
This commit is contained in:
Stephan Kulow 2012-04-23 07:15:39 +00:00 committed by Git OBS Bridge
commit 6d0a709e52
2 changed files with 23 additions and 2 deletions

View File

@ -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

View File

@ -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