fab351
From 86d48f5c45d2d2c19cb575fa377763c069e57b8a Mon Sep 17 00:00:00 2001
fab351
From: Ondrej Dubaj <odubaj@redhat.com>
fab351
Date: Thu, 29 Aug 2019 14:31:06 +0200
fab351
Subject: [PATCH] added debug-shell to initrd in systemd version >= 240
fab351
fab351
---
fab351
 dracut.spec                         | 2 +-
fab351
 modules.d/00systemd/module-setup.sh | 4 ++++
fab351
 2 files changed, 5 insertions(+), 1 deletion(-)
fab351
fab351
diff --git a/dracut.spec b/dracut.spec
fab351
index 92c7f7bf..0f7eb4bf 100644
fab351
--- a/dracut.spec
fab351
+++ b/dracut.spec
fab351
@@ -88,7 +88,7 @@ Recommends: hardlink
fab351
 Recommends: pigz
fab351
 Recommends: kpartx
fab351
 Requires: util-linux >= 2.21
fab351
-Requires: systemd >= 219
fab351
+Requires: systemd >= 239-23
fab351
 Requires: systemd-udev >= 219
fab351
 Requires: procps-ng
fab351
 %else
fab351
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
fab351
index ed177826..e4a3f323 100755
fab351
--- a/modules.d/00systemd/module-setup.sh
fab351
+++ b/modules.d/00systemd/module-setup.sh
fab351
@@ -31,6 +31,10 @@ install() {
fab351
         exit 1
fab351
     fi
fab351
 
fab351
+    inst_multiple -o \
fab351
+        $systemdutildir/system-generators/systemd-debug-generator \
fab351
+        $systemdsystemunitdir/debug-shell.service
fab351
+
fab351
     inst_multiple -o \
fab351
         $systemdutildir/systemd \
fab351
         $systemdutildir/systemd-coredump \
fab351