From 37c8017ed1249b4e34634b7df691b82f62e6361b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 2 Apr 2022 13:46:54 -0700 Subject: rename SYSTEMD-{-USER -> USER-INSTANCE-ARGS} & stop using &rest Signed-off-by: Sean Whitton --- src/connection/linux-namespace.lisp | 5 +++-- src/package.lisp | 2 +- src/property/systemd.lisp | 2 +- src/util.lisp | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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." -- cgit v1.2.3