dracut-shutdown now executes the unpacking on ExecStop
To ensure that unpacking happens before any boot.automount is stopped, let dracut-shutdown start as a sysinit.target service and unpack on ExecStop.master
parent
85752f0f5f
commit
4f03054e54
4
Makefile
4
Makefile
|
@ -125,9 +125,9 @@ endif
|
|||
if [ -n "$(systemdsystemunitdir)" ]; then \
|
||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
||||
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \
|
||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \
|
||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \
|
||||
ln -s ../dracut-shutdown.service \
|
||||
$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
|
||||
$(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/dracut-shutdown.service; \
|
||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \
|
||||
for i in \
|
||||
dracut-cmdline.service \
|
||||
|
|
|
@ -399,7 +399,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||
%dir %{_sharedstatedir}/initramfs
|
||||
%if %{defined _unitdir}
|
||||
%{_unitdir}/dracut-shutdown.service
|
||||
%{_unitdir}/shutdown.target.wants/dracut-shutdown.service
|
||||
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
|
||||
%{_unitdir}/dracut-cmdline.service
|
||||
%{_unitdir}/dracut-initqueue.service
|
||||
%{_unitdir}/dracut-mount.service
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Restore /run/initramfs
|
||||
Description=Restore /run/initramfs on shutdown
|
||||
Documentation=man:dracut-shutdown.service(8)
|
||||
After=getty@tty1.service display-manager.service
|
||||
After=local-fs.target
|
||||
Wants=local-fs.target
|
||||
Before=systemd-reboot.service shutdown.target
|
||||
DefaultDependencies=no
|
||||
ConditionPathExists=/run/initramfs/.need_shutdown
|
||||
ConditionPathExists=!/run/initramfs/bin/sh
|
||||
|
||||
[Service]
|
||||
ExecStart=-/usr/lib/dracut/dracut-initramfs-restore
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/true
|
||||
ExecStop=/usr/lib/dracut/dracut-initramfs-restore
|
||||
|
|
Loading…
Reference in New Issue