]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
99squash: Don't clean up squahfs on isolate
authorKairui Song <kasong@redhat.com>
Thu, 18 Oct 2018 09:05:22 +0000 (17:05 +0800)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 18 Oct 2018 09:55:50 +0000 (11:55 +0200)
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 <kasong@redhat.com>
modules.d/99squash/squash-mnt-clear.service

index 8dd17812d918fafde31086252d193040f5e03315..f8d5db46fcb6e7737050f00668304d08b5d32441 100644 (file)
@@ -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