From 7d739f0d702696dd57a21bb267f9b2ba32a5a1523ad3122a6de07a9e367d93c2 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 23 Nov 2012 11:06:55 +0000 Subject: [PATCH] - Fix creation of /dev/root link. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=315 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 32 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 11df0f5b..48743ca7 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 22 14:22:00 UTC 2012 - rmilasan@suse.com + +- Fix creation of /dev/root link. + ------------------------------------------------------------------- Tue Nov 20 18:25:49 CET 2012 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index a82dbd62..6a408acd 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -401,7 +401,9 @@ install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service +sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule +sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants ln -sf ../udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants @@ -588,24 +590,28 @@ if test -f /proc/1/exe -a -d /proc/1/root; then fi fi -[ -x /sbin/mkinitrd_setup ] && /sbin/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 +if [ "${YAST_IS_RUNNING}" != "instsys" ]; then + 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 + [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup + /sbin/mkinitrd || : + fi fi %postun -n %{udevpkgname} %insserv_cleanup systemctl daemon-reload >/dev/null 2>&1 || : -[ -x /sbin/mkinitrd_setup ] && /sbin/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 +if [ "${YAST_IS_RUNNING}" != "instsys" ]; then + 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 + [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup + /sbin/mkinitrd || : + fi fi %post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig @@ -620,7 +626,7 @@ fi %endif %clean -rm -rf %{buildroot} +# rm -rf %{buildroot} %files %defattr(-,root,root)