From 953b38327019b070f27e247f9116d0c51f8d9bac Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 16 Apr 2022 15:35:55 -0700 Subject: convert *LINUX-{BASIC,EFIVARS}-VFS* -> +LINUX-{BASIC,EFIVARS}-VFS+ Signed-off-by: Sean Whitton --- src/connection/chroot.lisp | 4 ++-- src/package.lisp | 4 ++-- src/property/installer.lisp | 2 +- src/property/mount.lisp | 16 +++++++++------- 4 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp index 80c79cb..45e7a6e 100644 --- a/src/connection/chroot.lisp +++ b/src/connection/chroot.lisp @@ -61,11 +61,11 @@ 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 mount:*linux-basic-vfs*) + (dolist (mount mount:+linux-basic-vfs+) (apply #'chroot-mount connection mount)) (chroot-mount connection "--bind" "/run" "/run") (when (remote-exists-p "/sys/firmware/efi/efivars") - (apply #'chroot-mount connection mount:*linux-efivars-vfs*))))) + (apply #'chroot-mount connection mount:+linux-efivars-vfs+))))) (defmethod propagate-connattr ((type (eql :opened-volumes)) connattr (connection chroot-connection)) diff --git a/src/package.lisp b/src/package.lisp index 9e0b036..3499491 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -483,8 +483,8 @@ #:unmounted-below #:unmounted-below-and-removed #:all-mounts - #:*linux-basic-vfs* - #:*linux-efivars-vfs* + #:+linux-basic-vfs+ + #:+linux-efivars-vfs+ #:assert-devtmpfs-udev-/dev)) (package :consfigurator.property.service diff --git a/src/property/installer.lisp b/src/property/installer.lisp index bad2255..0791918 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -285,7 +285,7 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." ;; Remount (mainly virtual) filesystems that other properties we will ;; apply might require (esp. relevant for installing bootloaders). - (dolist (mount mount:*linux-basic-vfs*) + (dolist (mount mount:+linux-basic-vfs+) (unless (preservedp (ensure-directory-pathname (lastcar mount))) (apply #'system "mount" mount))) (when efi-system-partition-mount-args diff --git a/src/property/mount.lisp b/src/property/mount.lisp index 98013a2..733f0b5 100644 --- a/src/property/mount.lisp +++ b/src/property/mount.lisp @@ -103,19 +103,21 @@ Uses findmnt(8), so Linux-specific." ;;;; Utilities for :LISP properties -(defparameter *linux-basic-vfs* '( +(define-constant +linux-basic-vfs+ '( ("-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"))) +("-t" "tmpfs" "-o" "mode=1777,strictatime,nodev,nosuid" "tmp" "/tmp")) + :test #'equal) -(defparameter *linux-efivars-vfs* - '("-t" "efivarfs" "-o" "nosuid,noexec,nodev" "efivarfs" - "/sys/firmware/efi/efivars") - "Arguments to mount(8) to mount the UEFI NVRAM. -After mounting /sys, mount this when /sys/firmware/efi/efivars exists.") +(define-constant +linux-efivars-vfs+ + '("-t" "efivarfs" "-o" "nosuid,noexec,nodev" "efivarfs" + "/sys/firmware/efi/efivars") + :documentation "Arguments to mount(8) to mount the UEFI NVRAM. +After mounting /sys, mount this when /sys/firmware/efi/efivars exists." + :test #'equal) (defun assert-devtmpfs-udev-/dev () "On a system with the Linux kernel, assert that /dev has fstype devtmpfs." -- cgit v1.2.3