aboutsummaryrefslogtreecommitdiff
path: root/src/property
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-27 18:18:08 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-28 15:05:56 -0700
commiteaba54b7f31acdfda8278ccce66b09291c58ac82 (patch)
tree73734f94c7b41add41a1c05dea4b64a8bed7e0f3 /src/property
parent23db859de6fb1237802705e3ff920f67332db3d8 (diff)
downloadconsfigurator-eaba54b7f31acdfda8278ccce66b09291c58ac82.tar.gz
DISK:VOLUME-BOOTLOADER -> DISK:VOLUME-BOOTLOADERS
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r--src/property/disk.lisp12
-rw-r--r--src/property/installer.lisp19
2 files changed, 18 insertions, 13 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp
index ca2d2f7..6cc8328 100644
--- a/src/property/disk.lisp
+++ b/src/property/disk.lisp
@@ -50,13 +50,13 @@ containing this one.
If a larger size is required to accommodate the VOLUME-CONTENTS of the volume
plus any metadata (e.g. partition tables), this value will be ignored.")
- (volume-bootloader
- :type list :initarg :boots-with :accessor volume-bootloader
+ (volume-bootloaders
+ :type list :initarg :boots-with :accessor volume-bootloaders
:documentation
- "List specifying a bootloader to be installed to this volume. The first
-element is a symbol identifying the type of bootloader, and the remaining
-elements are a plist of keyword arguments to be passed to the implementation
-of INSTALLER:INSTALL-BOOTLOADER for that bootloader type.
+ "List or list of lists specifying bootloaders to be installed to this volume.
+The first element of each list is a symbol identifying the type of bootloader,
+and the remaining elements are a plist of keyword arguments to be passed to
+the implementation of INSTALLER:INSTALL-BOOTLOADER for that bootloader type.
Typically only the top level PHYSICAL-DISK of a host's volumes will have this
slot bound."))
diff --git a/src/property/installer.lisp b/src/property/installer.lisp
index 816ca05..813ad10 100644
--- a/src/property/installer.lisp
+++ b/src/property/installer.lisp
@@ -41,10 +41,12 @@ BOOTLOADER-TYPE to VOLUME."))
(defun get-propspecs (volumes running-on-target)
(loop for volume in (mapcan #'all-subvolumes volumes)
- when (slot-boundp volume 'volume-bootloader)
- collect (destructuring-bind (type . args) (volume-bootloader volume)
- (apply #'install-bootloader-propspec
- type volume running-on-target args))))
+ when (slot-boundp volume 'volume-bootloaders)
+ nconc (loop with bls = (volume-bootloaders volume)
+ for bootloader in (if (listp (car bls)) bls (list bls))
+ collect (destructuring-bind (type . args) bootloader
+ (apply #'install-bootloader-propspec
+ type volume running-on-target args)))))
;; At :HOSTATTRS time we don't have the OPENED-VOLUME values required by the
;; :APPLY subroutines which actually install the bootloaders. So we call
@@ -124,9 +126,12 @@ install a package providing /usr/sbin/grub-install, but it won't execute it."
(:desc "Bootloader binaries installed")
(loop
for volume in (mapcan #'all-subvolumes (get-hostattrs :volumes))
- when (slot-boundp volume 'volume-bootloader)
- collect (destructuring-bind (type . args) (volume-bootloader volume)
- (apply #'install-bootloader-binaries-propspec type volume args))
+ when (slot-boundp volume 'volume-bootloaders)
+ nconc (loop with bls = (volume-bootloaders volume)
+ for bootloader in (if (listp (car bls)) bls (list bls))
+ collect (destructuring-bind (type . args) bootloader
+ (apply #'install-bootloader-binaries-propspec
+ type volume args)))
into propspecs
finally
(setq propspecs (delete-duplicates propspecs :test #'tree-equal))