aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/chroot.lisp13
-rw-r--r--src/connection/fork.lisp4
2 files changed, 13 insertions, 4 deletions
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index 802d3ce..21d0cc2 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -81,6 +81,19 @@ should be the mount point, without the chroot's root prefixed.")
(chroot-mount connection "-t" "efivarfs" "-o" "nosuid,noexec,nodev"
"efivarfs" "/sys/firmware/efi/efivars")))))
+(defmethod propagate-connattr
+ ((type (eql :opened-volumes)) connattr (connection chroot-connection))
+ (with-slots (into) connection
+ (loop for volume in connattr
+ when (and (subtypep (type-of volume) 'disk:filesystem)
+ (slot-boundp volume 'disk:mount-point)
+ (subpathp (disk:mount-point volume) into))
+ collect (let ((copy (disk:copy-volume-and-contents volume)))
+ (setf (disk:mount-point copy)
+ (in-chroot-pathname (disk:mount-point copy) into))
+ copy)
+ else collect volume)))
+
;;;; :CHROOT.FORK
diff --git a/src/connection/fork.lisp b/src/connection/fork.lisp
index 0bc139c..072145c 100644
--- a/src/connection/fork.lisp
+++ b/src/connection/fork.lisp
@@ -111,7 +111,3 @@ for example, such that we don't see it."
(error
"Fork connection child failed, exit code ~D" exit-status))
(values nil (if (zerop status) :no-change nil))))))))))
-
-(defmethod propagate-connattr
- ((type (eql :opened-volumes)) connattr (connection fork-connection))
- connattr)