From d619e8d97744ee9ab4be00ae34a86b5314c4248b Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Aug 19 2020 14:22:49 +0000 Subject: 99squash: Don't clean up squahfs on isolate The only time we need to cleanup squahfs manually is on switch root, to release resource and memory. We've covered that by setting "Conflicts=initrd-switch-root.target" for squash cleanup service. On shutdown systemd will take care of squahfs mounts. But for other isolate, files in initramfs are most likely still required, so don't clean up squahfs. For example, kdump's emergency handler will isolate into its own target, if squahfs is cleaned up it will fail. Signed-off-by: Kairui Song Cherry-picked from: b9af0fcd Resolves: #1641423 patch_name: 0005.patch present_in_specfile: true location_in_specfile: 5 squash_commits: true --- diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service index 8dd1781..f8d5db4 100644 --- a/modules.d/99squash/squash-mnt-clear.service +++ b/modules.d/99squash/squash-mnt-clear.service @@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service Before=initrd-cleanup.service ConditionPathExists=/squash/root Conflicts=initrd-switch-root.target +IgnoreOnIsolate=true [Service] Type=oneshot