|
|
712866 |
From 017c16b97a384915467583cc07c3afb9a98fc259 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Mon, 27 Jun 2016 10:27:05 +0200
|
|
|
712866 |
Subject: [PATCH] systemd: add -.slice and make reboot work
|
|
|
712866 |
|
|
|
712866 |
-.slice and conflicting with emergency.target and shutdown.target
|
|
|
712866 |
makes reboot work
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/98systemd/dracut-cmdline-ask.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-cmdline.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-emergency.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-initqueue.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-mount.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-pre-mount.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-pre-pivot.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-pre-trigger.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/dracut-pre-udev.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/emergency.service | 2 ++
|
|
|
712866 |
modules.d/98systemd/module-setup.sh | 1 +
|
|
|
712866 |
11 files changed, 21 insertions(+)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service
|
|
|
5c6c2a |
index 9993671c..3d489a4e 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-cmdline-ask.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-cmdline-ask.service
|
|
|
712866 |
@@ -15,6 +15,8 @@ After=systemd-journald.socket
|
|
|
712866 |
Wants=systemd-journald.socket
|
|
|
712866 |
ConditionPathExists=/etc/initrd-release
|
|
|
712866 |
ConditionKernelCommandLine=rd.cmdline=ask
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service
|
|
|
5c6c2a |
index f888bf46..7f0835b4 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-cmdline.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-cmdline.service
|
|
|
712866 |
@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
|
|
|
712866 |
ConditionKernelCommandLine=|rd.break=cmdline
|
|
|
712866 |
ConditionKernelCommandLine=|resume
|
|
|
712866 |
ConditionKernelCommandLine=|noresume
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service
|
|
|
5c6c2a |
index 5a6d5250..5c014110 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-emergency.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-emergency.service
|
|
|
712866 |
@@ -14,6 +14,8 @@ After=systemd-vconsole-setup.service
|
|
|
712866 |
Wants=systemd-vconsole-setup.service
|
|
|
712866 |
Conflicts=emergency.service emergency.target
|
|
|
712866 |
ConditionPathExists=!/lib/dracut/no-emergency-shell
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=HOME=/
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
|
|
|
5c6c2a |
index 1b9e701b..6340dd4d 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-initqueue.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-initqueue.service
|
|
|
712866 |
@@ -23,6 +23,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/finished/*.sh
|
|
|
712866 |
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh
|
|
|
712866 |
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh
|
|
|
712866 |
ConditionKernelCommandLine=|rd.break=initqueue
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service
|
|
|
5c6c2a |
index 20c633d0..2e1e47b9 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-mount.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-mount.service
|
|
|
712866 |
@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service
|
|
|
712866 |
ConditionPathExists=/etc/initrd-release
|
|
|
712866 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
|
|
|
712866 |
ConditionKernelCommandLine=|rd.break=mount
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service
|
|
|
5c6c2a |
index d7be48d8..ed67f9df 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-pre-mount.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-pre-mount.service
|
|
|
712866 |
@@ -17,6 +17,8 @@ After=cryptsetup.target
|
|
|
712866 |
ConditionPathExists=/etc/initrd-release
|
|
|
712866 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
|
|
|
712866 |
ConditionKernelCommandLine=|rd.break=pre-mount
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
|
|
|
5c6c2a |
index f4539006..1faeb78b 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-pre-pivot.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-pre-pivot.service
|
|
|
712866 |
@@ -16,6 +16,8 @@ Before=initrd-cleanup.service
|
|
|
712866 |
Wants=remote-fs.target
|
|
|
712866 |
After=remote-fs.target
|
|
|
712866 |
ConditionPathExists=/etc/initrd-release
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
|
|
|
5c6c2a |
index 69b4cceb..f1980368 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-pre-trigger.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-pre-trigger.service
|
|
|
712866 |
@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service
|
|
|
712866 |
ConditionPathExists=/etc/initrd-release
|
|
|
712866 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
|
|
|
712866 |
ConditionKernelCommandLine=|rd.break=pre-trigger
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
|
|
|
5c6c2a |
index d125b375..7fb33044 100644
|
|
|
712866 |
--- a/modules.d/98systemd/dracut-pre-udev.service
|
|
|
712866 |
+++ b/modules.d/98systemd/dracut-pre-udev.service
|
|
|
712866 |
@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev
|
|
|
712866 |
ConditionKernelCommandLine=|rd.driver.blacklist
|
|
|
712866 |
ConditionKernelCommandLine=|rd.driver.pre
|
|
|
712866 |
ConditionKernelCommandLine=|rd.driver.post
|
|
|
712866 |
+Conflicts=shutdown.target emergency.target
|
|
|
712866 |
+Before=shutdown.target emergency.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=DRACUT_SYSTEMD=1
|
|
|
712866 |
diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service
|
|
|
5c6c2a |
index 5f1eaa23..5c2c1c70 100644
|
|
|
712866 |
--- a/modules.d/98systemd/emergency.service
|
|
|
712866 |
+++ b/modules.d/98systemd/emergency.service
|
|
|
712866 |
@@ -13,6 +13,8 @@ DefaultDependencies=no
|
|
|
712866 |
After=systemd-vconsole-setup.service
|
|
|
712866 |
Wants=systemd-vconsole-setup.service
|
|
|
712866 |
ConditionPathExists=!/lib/dracut/no-emergency-shell
|
|
|
712866 |
+Conflicts=shutdown.target
|
|
|
712866 |
+Before=shutdown.target
|
|
|
712866 |
|
|
|
712866 |
[Service]
|
|
|
712866 |
Environment=HOME=/
|
|
|
712866 |
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
|
|
|
5c6c2a |
index 647315f0..64b83a0e 100755
|
|
|
712866 |
--- a/modules.d/98systemd/module-setup.sh
|
|
|
712866 |
+++ b/modules.d/98systemd/module-setup.sh
|
|
|
712866 |
@@ -137,6 +137,7 @@ install() {
|
|
|
712866 |
\
|
|
|
712866 |
$systemdsystemunitdir/slices.target \
|
|
|
712866 |
$systemdsystemunitdir/system.slice \
|
|
|
712866 |
+ $systemdsystemunitdir/-.slice \
|
|
|
712866 |
\
|
|
|
712866 |
$tmpfilesdir/systemd.conf \
|
|
|
712866 |
\
|