diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-12-05 15:02:24 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-12-05 15:02:24 +0000 |
commit | 280842d4e777a78c9b26de97f9f7fd5d5c17f9c7 (patch) | |
tree | bc73da8d0fe6f2986fcf884a79c3fac0c86e7281 | |
parent | 8627902ff12d620399d0fbc455c639f2db7843f1 (diff) | |
download | consfigurator-master.tar.gz |
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | doc/news.rst | 3 | ||||
-rw-r--r-- | src/property/file.lisp | 31 |
2 files changed, 21 insertions, 13 deletions
diff --git a/doc/news.rst b/doc/news.rst index 190a4f6..6b4b736 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -32,6 +32,9 @@ you should review this document and see if your consfig needs updating. ``/etc/fstab`` entries for each logical volume it created rather than for each filesystem it tries to mount. +- FILE:HOST-DATA-UPLOADED and FILE:HOST-SECRET-UPLOADED can now upload + multiple files. + 1.3.1 (2023-06-12) ------------------ diff --git a/src/property/file.lisp b/src/property/file.lisp index 8ab31d1..f5866c8 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -173,13 +173,15 @@ any of the regular expressions PATTERNS." (containing-directory-exists destination) (maybe-write-remote-file-data destination iden1 iden2))) -(defproplist host-data-uploaded :posix - (destination - ;; Require an absolute path because we don't know the remote home - ;; directory at hostattrs time, so can't resolve it ourselves. - &aux (destination (unix-namestring - (ensure-pathname destination :want-absolute t)))) - (data-uploaded (get-hostname) destination destination)) +(defpropspec host-data-uploaded :posix (&rest destinations) + (loop with hn = (get-hostname) + for destination in destinations + ;; Require absolute paths because we don't know the remote home + ;; directory at hostattrs time, so can't resolve it ourselves. + for destination* = (unix-namestring + (ensure-pathname destination :want-absolute t)) + collect `(data-uploaded ,hn ,destination* ,destination*) into propapps + finally (return (cons 'seqprops propapps)))) (defprop secret-uploaded :posix (iden1 iden2 destination) (:desc #?"${destination} installed") @@ -189,12 +191,15 @@ any of the regular expressions PATTERNS." (:apply (maybe-write-remote-file-data destination iden1 iden2 :mode #o600))) -(defproplist host-secret-uploaded :posix - (destination - ;; Require an absolute path like with HOST-DATA-UPLOADED. - &aux (destination (unix-namestring - (ensure-pathname destination :want-absolute t)))) - (secret-uploaded (get-hostname) destination destination)) +(defpropspec host-secret-uploaded :posix (&rest destinations) + (loop with hn = (get-hostname) + for destination in destinations + ;; Require absolute paths like with HOST-DATA-UPLOADED. + for destination* = (unix-namestring + (ensure-pathname destination :want-absolute t)) + collect `(secret-uploaded ,hn ,destination* ,destination*) + into propapps + finally (return (cons 'seqprops propapps)))) (defprop data-cache-purged :posix () "Ensure that any prerequisite data cached in the remote home directory is removed." |