aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-02 10:42:55 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-06 21:19:39 -0700
commite0672a93ed2e4899dd3ab40e247edac82827e2bc (patch)
tree60a46955885e9e4477e7c20eca769dc15e3bb5eb /src/connection
parenta4cb8a892183462b0713580a5e2134c3f3d1d95d (diff)
downloadconsfigurator-e0672a93ed2e4899dd3ab40e247edac82827e2bc.tar.gz
factor out MOUNT:*{STANDARD-LINUX,LINUX-EFIVARS}-VFS*
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/chroot.lisp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index 2895641..31ce5cb 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -58,15 +58,6 @@ should be the mount point, without the chroot's root prefixed.")
(dolist (mount (chroot-mounts connection))
(mrun "umount" mount)))
-(defparameter *standard-chroot-mounts* '(
-("-t" "proc" "-o" "nosuid,noexec,nodev" "proc" "/proc")
-("-t" "sysfs" "-o" "nosuid,noexec,nodev,ro" "sys" "/sys")
-("-t" "devtmpfs" "-o" "mode=0755,nosuid" "udev" "/dev")
-("-t" "devpts" "-o" "mode=0620,gid=5,nosuid,noexec" "devpts" "/dev/pts")
-("-t" "tmpfs" "-o" "mode=1777,nosuid,nodev" "shm" "/dev/shm")
-("-t" "tmpfs" "-o" "mode=1777,strictatime,nodev,nosuid" "tmp" "/tmp")
-("--bind" "/run" "/run")))
-
(defmethod initialize-instance :after ((connection chroot-connection) &key)
(when (string= "Linux" (stripln (run "uname")))
(with-slots (into) connection
@@ -76,11 +67,10 @@ should be the mount point, without the chroot's root prefixed.")
(chroot-mount connection "--bind" into "/"))
;; Now set up the usual bind mounts. Help here from arch-chroot(8).
(mount:assert-devtmpfs-udev-/dev)
- (dolist (mount *standard-chroot-mounts*)
+ (dolist (mount mount:*standard-linux-vfs*)
(apply #'chroot-mount connection mount))
(when (remote-exists-p "/sys/firmware/efi/efivars")
- (chroot-mount connection "-t" "efivarfs" "-o" "nosuid,noexec,nodev"
- "efivarfs" "/sys/firmware/efi/efivars")))))
+ (apply #'chroot-mount connection mount:*linux-efivars-vfs*)))))
(defmethod propagate-connattr
((type (eql :opened-volumes)) connattr (connection chroot-connection))