]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Revert "systemd/dracut-pre-pivot.service: force clean stop of udevd and cleanup-db"
authorHarald Hoyer <harald@redhat.com>
Tue, 17 Jul 2012 11:05:11 +0000 (13:05 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 17 Jul 2012 11:05:11 +0000 (13:05 +0200)
This reverts commit a43f97c4e35d0d9c7e6e315e11c909e86936e1cc.

modules.d/98systemd/dracut-pre-pivot.service
modules.d/98systemd/dracut-pre-pivot.sh
modules.d/98systemd/module-setup.sh
modules.d/98systemd/udevadm-cleanup-db.service [new file with mode: 0644]

index 317b4769cb06bda25aab861bf714aa2b58a383af..61257cf0c16b75e750e01dcad1cea1230888c7ae 100644 (file)
@@ -16,7 +16,7 @@ ConditionPathExists=/etc/initrd-release
 [Service]
 Type=oneshot
 ExecStart=-/bin/dracut-pre-pivot
-ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd-switch-root.target
+ExecStopPost=-/usr/bin/systemctl isolate initrd-switch-root.target
 StandardInput=null
 StandardOutput=syslog
 StandardError=syslog+console
index 44afe54822e9379ed39454f5b59aab65c5346009..31dded50581640615dbbd89138d9a92fdbaad39d 100755 (executable)
@@ -39,7 +39,4 @@ echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf
 
 getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root"
 
-/usr/bin/udevadm control --exit || warn "/usr/bin/udevadm control --exit failed"
-/usr/bin/udevadm info --cleanup-db || warn "/usr/bin/udevadm info --cleanup-db failed"
-
 exit 0
index 05faf87451b03894010671e3e456222c769e63d5..5cb236c4634979c608871584360866e73c85c298 100755 (executable)
@@ -143,6 +143,10 @@ install() {
     inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service
     ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-pivot.service"
 
+    inst_simple "$moddir/udevadm-cleanup-db.service" ${dracutsystemunitdir}/udevadm-cleanup-db.service
+    mkdir -p "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires"
+    ln -fs ../udevadm-cleanup-db.service "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service"
+
     inst_script "$moddir/service-to-run.sh" "${systemdutildir}/system-generators/service-to-run"
 }
 
diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service
new file mode 100644 (file)
index 0000000..368a0dd
--- /dev/null
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Cleanup udevd DB
+DefaultDependencies=no
+ConditionPathExists=/etc/initrd-release
+Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
+Before=initrd-switch-root.service
+
+[Service]
+Type=oneshot
+ExecStart=-/usr/bin/udevadm info --cleanup-db
+StandardInput=null
+StandardOutput=null
+StandardError=null