aboutsummaryrefslogtreecommitdiff
path: root/src/property/disk.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-08 10:50:39 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-10 20:46:00 -0700
commit76d96ad3ba78dc392ebb1aff66bbef210f9a876e (patch)
treea215819bbbfa3c27178f1666c3b0411b767b5ea8 /src/property/disk.lisp
parent4450ef759a93133a6bb970358e21178000861347 (diff)
downloadconsfigurator-76d96ad3ba78dc392ebb1aff66bbef210f9a876e.tar.gz
factor out DISK::IMAGE-CHROOT
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/disk.lisp')
-rw-r--r--src/property/disk.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp
index a97392c..b66bae7 100644
--- a/src/property/disk.lisp
+++ b/src/property/disk.lisp
@@ -888,6 +888,10 @@ the LVM physical volumes corresponding to those volume groups."
;; Finally, create the volumes.
(create-volumes-and-contents volumes))))
+(defun image-chroot (image-pathname)
+ (ensure-directory-pathname
+ (strcat (unix-namestring image-pathname) ".chroot")))
+
(defpropspec raw-image-built-for :lisp
(options host image-pathname &key rebuild)
"Build a raw disk image for HOST at IMAGE-PATHNAME.
@@ -913,8 +917,7 @@ Unless REBUILD, the image will not be repartitioned even if the specification
of the host's volumes changes, although the contents of the image's
filesystems will be incrementally updated when other properties change."
(:desc #?"Built image for ${(get-hostname host)} @ ${image-pathname}")
- (let ((chroot (ensure-directory-pathname
- (strcat (unix-namestring image-pathname) ".chroot")))
+ (let ((chroot (image-chroot image-pathname))
(volumes
(loop
with found