9f65cc
From 2fe454f21b6b3890b02f52810a662530ec019968 Mon Sep 17 00:00:00 2001
9f65cc
From: mulhern <amulhern@redhat.com>
9f65cc
Date: Wed, 19 Aug 2020 11:11:14 -0400
9f65cc
Subject: [PATCH] Remove stratis module
9f65cc
9f65cc
It is obsolete. An approach which does not start the daemon is being worked
9f65cc
on.
9f65cc
9f65cc
Signed-off-by: mulhern <amulhern@redhat.com>
9f65cc
(cherry picked from commit fe761330e5db60f19f0ab2d937ea71a5b2438656)
9f65cc
9f65cc
Cherry-picked from: fe761330e5db60f19f0ab2d937ea71a5b2438656
9f65cc
Resolves: #1950572
9f65cc
---
9f65cc
 dracut.spec                               |  1 -
9f65cc
 modules.d/90stratis/module-setup.sh       | 33 -------------------------------
9f65cc
 modules.d/90stratis/stratisd-init.service | 15 --------------
9f65cc
 modules.d/90stratis/stratisd-start.sh     |  3 ---
9f65cc
 modules.d/90stratis/stratisd-stop.sh      |  6 ------
9f65cc
 5 files changed, 58 deletions(-)
9f65cc
9f65cc
diff --git a/dracut.spec b/dracut.spec
9f65cc
index fa3e4b99..dcaafa61 100644
9f65cc
--- a/dracut.spec
9f65cc
+++ b/dracut.spec
9f65cc
@@ -365,7 +365,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
9f65cc
 %{dracutlibdir}/modules.d/90lvm
9f65cc
 %{dracutlibdir}/modules.d/90mdraid
9f65cc
 %{dracutlibdir}/modules.d/90multipath
9f65cc
-%{dracutlibdir}/modules.d/90stratis
9f65cc
 %{dracutlibdir}/modules.d/90qemu
9f65cc
 %{dracutlibdir}/modules.d/91crypt-gpg
9f65cc
 %{dracutlibdir}/modules.d/91crypt-loop
9f65cc
diff --git a/modules.d/90stratis/module-setup.sh b/modules.d/90stratis/module-setup.sh
9f65cc
deleted file mode 100755
9f65cc
index 943f572e..00000000
9f65cc
--- a/modules.d/90stratis/module-setup.sh
9f65cc
+++ /dev/null
9f65cc
@@ -1,33 +0,0 @@
9f65cc
-#!/bin/bash
9f65cc
-
9f65cc
-# called by dracut
9f65cc
-check() {
9f65cc
-    require_binaries stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs || return 1
9f65cc
-    return 255
9f65cc
-}
9f65cc
-
9f65cc
-# called by dracut
9f65cc
-depends() {
9f65cc
-    echo dm
9f65cc
-    return 0
9f65cc
-}
9f65cc
-
9f65cc
-# called by dracut
9f65cc
-installkernel() {
9f65cc
-    instmods xfs
9f65cc
-}
9f65cc
-
9f65cc
-# called by dracut
9f65cc
-install() {
9f65cc
-
9f65cc
-    inst_multiple stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs
9f65cc
-
9f65cc
-    if dracut_module_included "systemd"; then
9f65cc
-        inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service"
9f65cc
-        systemctl -q --root "$initdir" enable stratisd-init.service
9f65cc
-    else
9f65cc
-        inst_hook cmdline 25 "$moddir/stratisd-start.sh"
9f65cc
-        inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
9f65cc
-    fi
9f65cc
-}
9f65cc
-
9f65cc
diff --git a/modules.d/90stratis/stratisd-init.service b/modules.d/90stratis/stratisd-init.service
9f65cc
deleted file mode 100644
9f65cc
index 318e8c27..00000000
9f65cc
--- a/modules.d/90stratis/stratisd-init.service
9f65cc
+++ /dev/null
9f65cc
@@ -1,15 +0,0 @@
9f65cc
-[Unit]
9f65cc
-Description=A daemon that manages a pool of block devices to create flexible file systems
9f65cc
-Documentation=man:stratisd(8)
9f65cc
-Before=local-fs-pre.target
9f65cc
-DefaultDependencies=no
9f65cc
-
9f65cc
-[Service]
9f65cc
-Type=simple
9f65cc
-ExecStart=/sbin/stratisd-init --debug
9f65cc
-KillSignal=SIGINT
9f65cc
-StandardOutput=syslog
9f65cc
-StandardError=syslog
9f65cc
-
9f65cc
-[Install]
9f65cc
-WantedBy=sysinit.target
9f65cc
diff --git a/modules.d/90stratis/stratisd-start.sh b/modules.d/90stratis/stratisd-start.sh
9f65cc
deleted file mode 100755
9f65cc
index afcd81fd..00000000
9f65cc
--- a/modules.d/90stratis/stratisd-start.sh
9f65cc
+++ /dev/null
9f65cc
@@ -1,3 +0,0 @@
9f65cc
-#!/bin/sh
9f65cc
-
9f65cc
-stratisd-init --debug > /dev/kmsg 2>&1 &
9f65cc
\ No newline at end of file
9f65cc
diff --git a/modules.d/90stratis/stratisd-stop.sh b/modules.d/90stratis/stratisd-stop.sh
9f65cc
deleted file mode 100755
9f65cc
index f394a843..00000000
9f65cc
--- a/modules.d/90stratis/stratisd-stop.sh
9f65cc
+++ /dev/null
9f65cc
@@ -1,6 +0,0 @@
9f65cc
-#!/bin/sh
9f65cc
-
9f65cc
-[ -f /lib/dracut-lib.sh ] && . /lib/dracut-lib.sh
9f65cc
-
9f65cc
-pid=$(pidof stratisd-init)
9f65cc
-[ -n "$pid" ] && kill ${pid}
9f65cc