]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvmf-autoconnect: Annotate the context to autoconnect
authorDaniel Wagner <dwagner@suse.de>
Fri, 16 Jun 2023 15:21:31 +0000 (17:21 +0200)
committerDaniel Wagner <wagi@monom.org>
Thu, 22 Jun 2023 12:31:09 +0000 (14:31 +0200)
By providing the execution context from the systemd service files,
nvme-cli can figure out if it is noop when looking at the configuration
files.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvmf-autoconnect/systemd/nvmf-autoconnect.service.in
nvmf-autoconnect/systemd/nvmf-connect@.service.in

index 06790c30b4ba6037d6b0da03eada0381424c34d0..621879a5f04b99d15caea83a8a40c7ba6b6f5223 100644 (file)
@@ -8,7 +8,7 @@ Before=remote-fs-pre.target
 [Service]
 Type=oneshot
 ExecStartPre=/sbin/modprobe nvme-fabrics
-ExecStart=@SBINDIR@/nvme connect-all
+ExecStart=@SBINDIR@/nvme connect-all --context=autoconnect
 
 [Install]
 WantedBy=default.target
index dd245ee6e636bf5111a25560ebc318989877befa..5ba70863e6bfe6d5a63cfb673485f3a2773cedeb 100644 (file)
@@ -13,4 +13,4 @@ Requires=nvmf-connect.target
 [Service]
 Type=simple
 Environment="CONNECT_ARGS=%i"
-ExecStart=/bin/sh -c "@SBINDIR@/nvme connect-all --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
+ExecStart=/bin/sh -c "@SBINDIR@/nvme connect-all --context=autoconnect --quiet `/bin/echo -e '${CONNECT_ARGS}'`"