e1f1de
From b63e0c5040d9881f8c3c0bc09fc21c6588c8a26f Mon Sep 17 00:00:00 2001
e1f1de
From: Kairui Song <kasong@redhat.com>
e1f1de
Date: Thu, 18 Oct 2018 17:05:22 +0800
e1f1de
Subject: [PATCH] 99squash: Don't clean up squahfs on isolate
e1f1de
e1f1de
The only time we need to cleanup squahfs manually is on switch root, to
e1f1de
release resource and memory. We've covered that by setting
e1f1de
"Conflicts=initrd-switch-root.target" for squash cleanup service.
e1f1de
On shutdown systemd will take care of squahfs mounts. But for other
e1f1de
isolate, files in initramfs are most likely still required, so don't
e1f1de
clean up squahfs. For example, kdump's emergency handler will isolate
e1f1de
into its own target, if squahfs is cleaned up it will fail.
e1f1de
e1f1de
Signed-off-by: Kairui Song <kasong@redhat.com>
e1f1de
e1f1de
Cherry-picked from: b9af0fcd
e1f1de
Resolves: #1641423
e1f1de
---
e1f1de
 modules.d/99squash/squash-mnt-clear.service | 1 +
e1f1de
 1 file changed, 1 insertion(+)
e1f1de
e1f1de
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
e1f1de
index 8dd17812..f8d5db46 100644
e1f1de
--- a/modules.d/99squash/squash-mnt-clear.service
e1f1de
+++ b/modules.d/99squash/squash-mnt-clear.service
e1f1de
@@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service
e1f1de
 Before=initrd-cleanup.service
e1f1de
 ConditionPathExists=/squash/root
e1f1de
 Conflicts=initrd-switch-root.target
e1f1de
+IgnoreOnIsolate=true
e1f1de
 
e1f1de
 [Service]
e1f1de
 Type=oneshot
e1f1de