aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-10 19:02:50 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-10 21:49:23 -0700
commitb1b4001db08c9a0b094523df18d287336651eeef (patch)
treece0b5e962a73daf3790d496f8b6f16947ffe935f /src/connection
parent102214763c91bb4b4f75bccd28f0e481f5eed8f8 (diff)
downloadconsfigurator-b1b4001db08c9a0b094523df18d287336651eeef.tar.gz
factor out MOUNTPOINTP
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/chroot.lisp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index acf8053..d0d59ac 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -48,7 +48,7 @@ should be the mount point, without the chroot's root prefixed.")
(slot-value connection 'into))))
;; We only mount when the target is not already a mount point, so we
;; don't shadow anything that the user has already set up.
- (when (plusp (mrun :for-exit "mountpoint" "-q" dest))
+ (unless (mountpointp dest)
(setq mount-args (copy-list mount-args))
(setf (lastcar mount-args) dest)
(apply #'mrun "mount" mount-args)
@@ -67,8 +67,7 @@ should be the mount point, without the chroot's root prefixed.")
(with-slots (into) connection
;; Ensure the chroot itself is a mountpoint so that findmnt(8) works
;; correctly within the chroot.
- (unless (zerop (mrun :for-exit "mountpoint" "-q" into))
- (chroot-mount connection "--bind" into "/"))
+ (unless (mountpointp into) (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:*standard-linux-vfs*)