From ad1ad2a2e3200a2de050a5a7560c7c806122e880 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Apr 2021 17:22:31 -0700 Subject: implement updating the newly installed system's fstab Signed-off-by: Sean Whitton --- src/property/installer.lisp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/property/installer.lisp') diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 11d7062..95f0fb5 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -31,22 +31,27 @@ (strcat (unix-namestring chroot) "/") (strcat (unix-namestring target) "/")))) -(defpropspec chroot-installed-to-volumes :posix (host chroot volumes) +(defpropspec chroot-installed-to-volumes :lisp (host chroot volumes) "Where CHROOT contains the root filesystem of HOST and VOLUMES is a list of volumes, recursively open the volumes and rsync in the contents of CHROOT. Also update the fstab and crypttab, and try to install a bootloader." (:desc #?"${chroot} installed to volumes") - (let ((target (ensure-directory-pathname - (strcat (unix-namestring chroot) ".target")))) + (let ((target + (ensure-directory-pathname + (strcat + (drop-trailing-slash + (unix-namestring (ensure-directory-pathname chroot))) + ".target")))) `(with-these-open-volumes (,volumes :mount-below ,target) + (%update-target-from-chroot ,chroot ,target) (chroot:deploys-these - ,chroot ,host + ,target ,host ,(make-propspec :systems nil :propspec '(eseqprops - ;; TODO (fstab:entries-for-opened-volumes) + (fstab:entries-for-opened-volumes) (file:lacks-lines "/etc/fstab" "# UNCONFIGURED FSTAB FOR BASE SYSTEM")))) ;; TODO Update /etc/crypttab ;; TODO Install bootloader - (%update-target-from-chroot ,chroot ,target)))) + ))) -- cgit v1.2.3