diff --git a/systemd.changes b/systemd.changes index 11df0f5..48743ca 100644 --- a/systemd.changes +++ b/systemd.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.spec b/systemd.spec index 4012f18..6a6325b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -396,7 +396,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 @@ -583,24 +585,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 @@ -615,7 +621,7 @@ fi %endif %clean -rm -rf %{buildroot} +# rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/udev-root-symlink.systemd b/udev-root-symlink.systemd index f909113..b92d081 100644 --- a/udev-root-symlink.systemd +++ b/udev-root-symlink.systemd @@ -6,4 +6,4 @@ DefaultDependencies=no [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/lib/udev/write_dev_root_rule +ExecStart=@@PREFIX@@/write_dev_root_rule diff --git a/write_dev_root_rule b/write_dev_root_rule index 9555789..5011aa3 100644 --- a/write_dev_root_rule +++ b/write_dev_root_rule @@ -1,6 +1,6 @@ #!/bin/sh -eval $(/sbin/udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/) +eval $(@@PREFIX@@/udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/) [ "$ROOT_MAJOR" -gt 0 ] || return mkdir -m 0755 -p /run/udev/rules.d >/dev/null 2>&1