Accepting request 142434 from home:rmilasan:branches:Base:System

- Fix creation of /dev/root link.

OBS-URL: https://build.opensuse.org/request/show/142434
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=314
This commit is contained in:
Frederic Crozat 2012-11-22 14:32:12 +00:00 committed by Git OBS Bridge
parent fa79d4401d
commit c0ff6f8db9
4 changed files with 26 additions and 15 deletions

View File

@ -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

View File

@ -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
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
/sbin/mkinitrd
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
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
/sbin/mkinitrd
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)

View File

@ -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

View File

@ -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