aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-08 23:27:29 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-10 21:31:38 -0700
commitdf4380caf8dc06deba98928191cd98b83d486e7e (patch)
treedf99984fbc231574d4d565b89d8d96c17f1bd755 /src/connection
parent2024a53b528f13f68e1687641c82c3a6ed44e537 (diff)
downloadconsfigurator-df4380caf8dc06deba98928191cd98b83d486e7e.tar.gz
chroot connections: unmount lazily
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/chroot.lisp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index ae2b337..7fbe860 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -56,7 +56,11 @@ should be the mount point, without the chroot's root prefixed.")
(defmethod connection-teardown :before ((connection chroot-connection))
(dolist (mount (chroot-mounts connection))
- (mrun "umount" mount)))
+ ;; There shouldn't be any processes left running in the chroot after we've
+ ;; finished deploying it, but it's quite easy to end up with things like
+ ;; gpg-agent holding on to /dev/null, for example, so for simplicity, do a
+ ;; lazy unmount.
+ (mrun "umount" "-l" mount)))
(defmethod initialize-instance :after ((connection chroot-connection) &key)
(when (string= "Linux" (stripln (run "uname")))