|
Harald Hoyer |
a66b47 |
From 030ade759004cb2bf81148bfdcd0ef821f7bd429 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
a66b47 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
a66b47 |
Date: Mon, 16 Jul 2012 10:13:53 +0200
|
|
Harald Hoyer |
a66b47 |
Subject: [PATCH] Fixes for systemd-187, which does the right thing for
|
|
Harald Hoyer |
a66b47 |
switch-root
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
---
|
|
Harald Hoyer |
a66b47 |
dracut.spec | 2 +-
|
|
Harald Hoyer |
a66b47 |
modules.d/98systemd/initrd-switch-root.service | 4 +---
|
|
Harald Hoyer |
a66b47 |
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
diff --git a/dracut.spec b/dracut.spec
|
|
Harald Hoyer |
a66b47 |
index c17860d..0e853fd 100644
|
|
Harald Hoyer |
a66b47 |
--- a/dracut.spec
|
|
Harald Hoyer |
a66b47 |
+++ b/dracut.spec
|
|
Harald Hoyer |
a66b47 |
@@ -84,7 +84,7 @@ Requires: file
|
|
Harald Hoyer |
a66b47 |
Requires: udev > 166
|
|
Harald Hoyer |
a66b47 |
%if 0%{?fedora} || 0%{?rhel} > 6
|
|
Harald Hoyer |
a66b47 |
Requires: util-linux >= 2.21
|
|
Harald Hoyer |
a66b47 |
-Requires: systemd >= 186
|
|
Harald Hoyer |
a66b47 |
+Conflicts: systemd <= 187
|
|
Harald Hoyer |
a66b47 |
%else
|
|
Harald Hoyer |
a66b47 |
Requires: util-linux-ng >= 2.21
|
|
Harald Hoyer |
a66b47 |
%endif
|
|
Harald Hoyer |
a66b47 |
diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service
|
|
Harald Hoyer |
a66b47 |
index f9fd10b..7b59e15 100644
|
|
Harald Hoyer |
a66b47 |
--- a/modules.d/98systemd/initrd-switch-root.service
|
|
Harald Hoyer |
a66b47 |
+++ b/modules.d/98systemd/initrd-switch-root.service
|
|
Harald Hoyer |
a66b47 |
@@ -11,15 +11,13 @@ DefaultDependencies=no
|
|
Harald Hoyer |
a66b47 |
ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
a66b47 |
OnFailure=emergency.service
|
|
Harald Hoyer |
a66b47 |
After=initrd-switch-root.target
|
|
Harald Hoyer |
a66b47 |
-Before=systemd-journal-flush.service
|
|
Harald Hoyer |
a66b47 |
-Before=sysinit.target local-fs.target swap.target emergency.service emergency.target
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
[Service]
|
|
Harald Hoyer |
a66b47 |
Type=oneshot
|
|
Harald Hoyer |
a66b47 |
EnvironmentFile=/run/initramfs/switch-root.conf
|
|
Harald Hoyer |
a66b47 |
# we have to use "--force" here, otherwise systemd would umount /run
|
|
Harald Hoyer |
a66b47 |
ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT}
|
|
Harald Hoyer |
a66b47 |
-ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service ; /bin/rm -f /run/initramfs/switch-root.conf
|
|
Harald Hoyer |
a66b47 |
+ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf
|
|
Harald Hoyer |
a66b47 |
StandardInput=null
|
|
Harald Hoyer |
a66b47 |
StandardOutput=null
|
|
Harald Hoyer |
a66b47 |
StandardError=null
|