diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-09-16 18:23:16 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-10-23 10:51:30 -0700 |
commit | b9cf8fa7dabb2f47ad38541316ccc373359838ee (patch) | |
tree | 160afdbe45e694c8e40ee605e1efe77deecf4da5 | |
parent | daf5c937b90626fbc0c69d3a09342312c59c125b (diff) | |
download | consfigurator-b9cf8fa7dabb2f47ad38541316ccc373359838ee.tar.gz |
factor out REMOTE-EXECUTABLE-FIND
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/connection.lisp | 3 | ||||
-rw-r--r-- | src/package.lisp | 1 | ||||
-rw-r--r-- | src/property/chroot.lisp | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index 0e80fff..8cd3a00 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -601,6 +601,9 @@ specification of POSIX ls(1))." (merge-pathnames path (merge-pathnames "consfigurator/" (get-connattr :XDG-CACHE-HOME)))) +(defun remote-executable-find (executable) + (zerop (mrun :for-exit "command" "-v" executable))) + (defun readfile (path) (connection-readfile *connection* diff --git a/src/package.lisp b/src/package.lisp index a779fca..a32c21f 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -159,6 +159,7 @@ #:remote-file-stats #:remote-last-reboot #:remote-consfigurator-cache-pathname + #:remote-executable-find #:mountpointp #:delete-remote-trees #:empty-remote-directory diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp index ecf7698..3cfe527 100644 --- a/src/property/chroot.lisp +++ b/src/property/chroot.lisp @@ -54,7 +54,7 @@ (apply #'run args)))) (defprop %debootstrap-manually-installed :posix () - (:check (zerop (mrun :for-exit "command" "-v" "debootstrap"))) + (:check (remote-executable-find "debootstrap")) (:apply (failed-change "Don't know how to install debootstrap(8) manually."))) |