From 6ddeb46f5a66864617a212c355266065368a2e31996195d02511cac7e8f547d2 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Fri, 20 Apr 2012 08:35:35 +0000 Subject: [PATCH] - Run update of initrd at %post and %postun. We need this to make sure initrd reflects the updates. OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=27 --- multipath-tools.changes | 6 ++++++ multipath-tools.spec | 35 ++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/multipath-tools.changes b/multipath-tools.changes index 693b557..a5378b1 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 20 08:35:06 UTC 2012 - rmilasan@suse.com + +- Run update of initrd at %post and %postun. + We need this to make sure initrd reflects the updates. + ------------------------------------------------------------------- Fri Sep 30 15:40:21 UTC 2011 - uli@suse.com diff --git a/multipath-tools.spec b/multipath-tools.spec index b55d6fe..61bc0bd 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ # # spec file for package multipath-tools # -# 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,20 +15,20 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: multipath-tools -BuildRequires: device-mapper-devel libaio-devel readline-devel +BuildRequires: device-mapper-devel +BuildRequires: libaio-devel +BuildRequires: readline-devel Url: http://christophe.varoqui.free.fr/ -License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ ; Public Domain, Freeware ; MIT License (or similar) -Group: System/Base -Requires: device-mapper kpartx -PreReq: %insserv_prereq %fillup_prereq coreutils grep -AutoReqProv: on +Requires: device-mapper +Requires: kpartx +PreReq: %insserv_prereq %fillup_prereq coreutils grep /sbin/mkinitrd Version: 0.4.8 -Release: 62 +Release: 0 Summary: Tools to Manage Multipathed Devices with the device-mapper +License: BSD-3-Clause ; GPL-2.0+ ; LGPL-2.1+ ; SUSE-Public-Domain ; MIT +Group: System/Base Source: multipath-tools-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: %{name}-%{version}-opensuse-11.3.diff.bz2 @@ -56,7 +56,6 @@ Authors: Christophe Varoqui %package -n kpartx -License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ ; Public Domain, Freeware ; MIT License (or similar) Summary: Manages partition tables on device-mapper devices Group: System/Base Requires: device-mapper @@ -98,7 +97,14 @@ if dmsetup --target multipath table | grep -q multipath ; then /etc/init.d/multipathd start fi [ -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 exit 0 + #{insserv /etc/init.d/multipathd} #{fillup_and_insserv boot.multipath} @@ -107,6 +113,13 @@ exit 0 %postun [ -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} %files