aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-02 14:06:53 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-02 14:08:56 -0700
commit159ff0bda5c67767599509313468c157118ad70e (patch)
treec53e8a3cbfbb879afa2f49407d3c8bfdb38d9aac /src/connection
parent8f8c59341e7f420397f79d47af2787ca55fba07b (diff)
downloadconsfigurator-159ff0bda5c67767599509313468c157118ad70e.tar.gz
rename READFILE, WRITEFILE, corresponding generics and some wrappers
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/local.lisp12
-rw-r--r--src/connection/shell-wrap.lisp12
-rw-r--r--src/connection/sudo.lisp6
3 files changed, 15 insertions, 15 deletions
diff --git a/src/connection/local.lisp b/src/connection/local.lisp
index 2c79036..d8a6880 100644
--- a/src/connection/local.lisp
+++ b/src/connection/local.lisp
@@ -42,16 +42,16 @@
(declare (ignore _))
(values output exit-code)))
-(defmethod connection-readfile ((connection local-connection) path)
+(defmethod connection-read-file ((connection local-connection) path)
(read-file-string path))
-(defmethod connection-readfile-and-remove ((connection local-connection) path)
+(defmethod connection-read-and-remove-file ((connection local-connection) path)
(prog1 (read-file-string path) (delete-file path)))
-(defmethod connection-writefile ((connection local-connection)
- path
- content
- mode)
+(defmethod connection-write-file ((connection local-connection)
+ path
+ content
+ mode)
;; we cannot use UIOP:WITH-TEMPORARY-FILE etc., because those do not ensure
;; the file is only readable by us, and we might be writing a secret key
(with-remote-temporary-file
diff --git a/src/connection/shell-wrap.lisp b/src/connection/shell-wrap.lisp
index 2867e20..51591b8 100644
--- a/src/connection/shell-wrap.lisp
+++ b/src/connection/shell-wrap.lisp
@@ -36,16 +36,16 @@
out
(error "Could not read~:[~; and/or remove~] ~S" delete path))))
-(defmethod connection-readfile ((c shell-wrap-connection) path)
+(defmethod connection-read-file ((c shell-wrap-connection) path)
(%readfile c path))
-(defmethod connection-readfile-and-remove ((c shell-wrap-connection) path)
+(defmethod connection-read-and-remove-file ((c shell-wrap-connection) path)
(%readfile c path t))
-(defmethod connection-writefile ((conn shell-wrap-connection)
- path
- content
- mode)
+(defmethod connection-write-file ((conn shell-wrap-connection)
+ path
+ content
+ mode)
(let ((cmd
(format
nil "set -e
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index a8fa3dc..cbdf259 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -66,9 +66,9 @@
;; We'll send the password followed by ^M, then the
;; real stdin. Use CODE-CHAR in this way so that we
;; can be sure ASCII ^M is what will get emitted.
- (writefile it (strcat (passphrase password)
- (string (code-char 13)))
- :mode #o600)))))
+ (write-remote-file it (strcat (passphrase password)
+ (string (code-char 13)))
+ :mode #o600)))))
(defmethod connection-tear-down :after ((connection sudo-connection))
(when-let ((file (slot-value connection 'password-file)))