diff --git a/systemd-mini.spec b/systemd-mini.spec index e34d1fc7..789fd00c 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -45,6 +45,7 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %endif +BuildRequires: config(suse-module-tools) %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif @@ -472,6 +473,11 @@ Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq Requires(post): lib%{udevpkgname}%{udev_major} +%if %{defined regenerate_initrd_post} +Requires(post): config(suse-module-tools) +Requires(postun): config(suse-module-tools) +Requires(posttrans): config(suse-module-tools) +%endif Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -1133,9 +1139,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi @@ -1147,12 +1158,22 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi +%if %{defined regenerate_initrd_post} +%posttrans -n %{udevpkgname} +%regenerate_initrd_posttrans +%endif + %post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig diff --git a/systemd.spec b/systemd.spec index 7d307c99..98121192 100644 --- a/systemd.spec +++ b/systemd.spec @@ -40,6 +40,7 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %endif +BuildRequires: config(suse-module-tools) %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif @@ -467,6 +468,11 @@ Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq Requires(post): lib%{udevpkgname}%{udev_major} +%if %{defined regenerate_initrd_post} +Requires(post): config(suse-module-tools) +Requires(postun): config(suse-module-tools) +Requires(posttrans): config(suse-module-tools) +%endif Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -1128,9 +1134,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi @@ -1142,12 +1153,22 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi +%if %{defined regenerate_initrd_post} +%posttrans -n %{udevpkgname} +%regenerate_initrd_posttrans +%endif + %post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig