aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-02 13:46:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-02 13:46:54 -0700
commit37c8017ed1249b4e34634b7df691b82f62e6361b (patch)
tree7b15e3a01782b43995c0a50a89a9119300c4b033
parentcbe56ebc323afa15d5aa2e1f918e01d660c6f322 (diff)
downloadconsfigurator-37c8017ed1249b4e34634b7df691b82f62e6361b.tar.gz
rename SYSTEMD-{-USER -> USER-INSTANCE-ARGS} & stop using &rest
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/connection/linux-namespace.lisp5
-rw-r--r--src/package.lisp2
-rw-r--r--src/property/systemd.lisp2
-rw-r--r--src/util.lisp2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/connection/linux-namespace.lisp b/src/connection/linux-namespace.lisp
index e4a72ef..7693330 100644
--- a/src/connection/linux-namespace.lisp
+++ b/src/connection/linux-namespace.lisp
@@ -129,8 +129,9 @@
"--" "sh" "-c" ,cmd)))
(if (and owner (not (string= owner (get-connattr :remote-user))))
(with-connattrs (:remote-uid owner-uid)
- (list* "runuser" "-u" owner "--" (apply #'systemd--user args)))
- (apply #'systemd--user args)))))
+ (list* "runuser" "-u" owner "--"
+ (systemd-user-instance-args args)))
+ (systemd-user-instance-args args)))))
(defmethod establish-connection
((type (eql :lxc-unpriv-attach)) remaining &key owner name pid uid gid)
diff --git a/src/package.lisp b/src/package.lisp
index d8c0c2f..7ff96b2 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -108,7 +108,7 @@
#:memstr=
#:define-simple-error
#:plist-to-long-options
- #:systemd--user
+ #:systemd-user-instance-args
#:with-local-temporary-directory
#:pathname-file
#:local-directory-contents
diff --git a/src/property/systemd.lisp b/src/property/systemd.lisp
index d805660..6251744 100644
--- a/src/property/systemd.lisp
+++ b/src/property/systemd.lisp
@@ -27,7 +27,7 @@
;;; case, so that more configuration is applicable to unbooted chroots.
(defun systemctl (fn user &rest args &aux (args (cons "systemctl" args)))
- (apply fn (if user (apply #'systemd--user args) args)))
+ (apply fn (if user (systemd-user-instance-args args) args)))
(defprop daemon-reloaded :posix (&optional user)
(:desc "Attempt to reload systemd manager configuration")
diff --git a/src/util.lisp b/src/util.lisp
index f480df6..3fa3e78 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -164,7 +164,7 @@ supported."
(doplist (k v plist args)
(push (strcat "--" (string-downcase (symbol-name k)) "=" v) args)))
-(defun systemd--user (&rest args)
+(defun systemd-user-instance-args (args)
"Where ARGS are args to RUN or MRUN for an invocation of a systemd command
which can take \"--user\", insert the \"--user\" parameter, and modify or
insert an :ENV parameter so that the call is more likely to succeed."