From 6644c0ef6722a8478689c94470092160da2af870 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 16 Jun 2023 17:21:31 +0200 Subject: [PATCH] nvmf-autoconnect: Annotate the context to autoconnect 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 --- nvmf-autoconnect/systemd/nvmf-autoconnect.service.in | 2 +- nvmf-autoconnect/systemd/nvmf-connect@.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in b/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in index 06790c30..621879a5 100644 --- a/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in +++ b/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in @@ -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 diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service.in b/nvmf-autoconnect/systemd/nvmf-connect@.service.in index dd245ee6..5ba70863 100644 --- a/nvmf-autoconnect/systemd/nvmf-connect@.service.in +++ b/nvmf-autoconnect/systemd/nvmf-connect@.service.in @@ -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}'`" -- 2.50.1