|
|
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
|
|
|
712866 |
index 9993671..3d489a4 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
|
|
|
712866 |
index f888bf4..7f0835b 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
|
|
|
712866 |
index 5a6d525..5c01411 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
|
|
|
712866 |
index 1b9e701..6340dd4 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
|
|
|
712866 |
index 20c633d..2e1e47b 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
|
|
|
712866 |
index d7be48d..ed67f9d 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
|
|
|
712866 |
index f453900..1faeb78 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
|
|
|
712866 |
index 69b4cce..f198036 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
|
|
|
712866 |
index d125b37..7fb3304 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
|
|
|
712866 |
index 5f1eaa2..5c2c1c7 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
|
|
|
712866 |
index 647315f..64b83a0 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 |
\
|