From 1f1a89c2f875050bc93a9ec1650f4ca96c9e91b69973bb609e88ff18a5a09890 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 12 Jun 2014 02:09:59 +0000 Subject: [PATCH] - mdadm.spec: change calling of mkinitrd to use the %regenerate_initrd_{post,posttrans} macros to optimise initrd regeneration. (bnc#881780) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=111 --- mdadm.changes | 7 +++++++ mdadm.spec | 21 ++++----------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/mdadm.changes b/mdadm.changes index e23d1cd..c742e13 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 12 02:08:31 UTC 2014 - nfbrown@suse.com + +- mdadm.spec: change calling of mkinitrd to use the + %regenerate_initrd_{post,posttrans} macros to optimise + initrd regeneration. (bnc#881780) + ------------------------------------------------------------------- Tue Jun 10 04:05:48 UTC 2014 - nfbrown@suse.com diff --git a/mdadm.spec b/mdadm.spec index 1528dc0..f8bbb4d 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -70,28 +70,15 @@ install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/ install -d %{buildroot}%{_systemdshutdowndir} %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 - +%{?regenerate_initrd_post} %fillup_only %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 - +%{?regenerate_initrd_post} %{insserv_cleanup} -%preun +%posttrans +%{?regenerate_initrd_posttrans} %clean rm -rf %{buildroot}