diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-08 23:27:29 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-10 21:31:38 -0700 |
commit | df4380caf8dc06deba98928191cd98b83d486e7e (patch) | |
tree | df99984fbc231574d4d565b89d8d96c17f1bd755 /src/connection/chroot.lisp | |
parent | 2024a53b528f13f68e1687641c82c3a6ed44e537 (diff) | |
download | consfigurator-df4380caf8dc06deba98928191cd98b83d486e7e.tar.gz |
chroot connections: unmount lazily
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/chroot.lisp')
-rw-r--r-- | src/connection/chroot.lisp | 6 |
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"))) |