From b1b4001db08c9a0b094523df18d287336651eeef Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 10 Jul 2021 19:02:50 -0700 Subject: factor out MOUNTPOINTP Signed-off-by: Sean Whitton --- src/property/installer.lisp | 4 ++-- src/property/mount.lisp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/property') diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 72119a0..0196438 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -189,7 +189,7 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." (flet ((preservedp (pathname) (member pathname preserved-directories :test #'pathname-equal))) (mount:assert-devtmpfs-udev-/dev) - (unless (zerop (mrun :for-exit "mountpoint" "-q" "/run")) + (unless (mountpointp "/run") (failed-change "/run is not a mount point; don't know what to do.")) ;; If there's an EFI system partition, we need to store knowledge of @@ -198,7 +198,7 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." ;; is responsible for adding an entry for the EFI system partition to ;; the new system's fstab, but we are responsible for restoring ;; knowledge of the partition to the kernel's mount table. - (when (zerop (mrun :for-exit "mountpoint" "-q" "/boot/efi")) + (when (mountpointp "/boot/efi") (destructuring-bind (type source options) (words (stripln (run "findmnt" "-nro" "FSTYPE,SOURCE,OPTIONS" "/boot/efi"))) diff --git a/src/property/mount.lisp b/src/property/mount.lisp index 21d5530..e0c3430 100644 --- a/src/property/mount.lisp +++ b/src/property/mount.lisp @@ -109,7 +109,7 @@ After mounting /sys, mount this when /sys/firmware/efi/efivars exists.") (defun assert-devtmpfs-udev-/dev () "On a system with the Linux kernel, assert that /dev has fstype devtmpfs." - (unless (and (zerop (mrun :for-exit "mountpoint" "-q" "/dev")) + (unless (and (mountpointp "/dev") (string= "devtmpfs udev" (stripln (run "findmnt" "-nro" "fstype,source" "/dev")))) (failed-change -- cgit v1.2.3