]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
nvmf-connect@.service: use nvme connect-all --matching
authorMartin Wilck <mwilck@suse.com>
Wed, 29 Apr 2020 17:09:58 +0000 (19:09 +0200)
committerKeith Busch <kbusch@kernel.org>
Thu, 30 Apr 2020 18:13:30 +0000 (12:13 -0600)
Use the --matching option from the autoconnect service to avoid
attempting connections multiple times.

nvmf-autoconnect/systemd/nvmf-connect@.service

index c60f146e990c1046bcc31a95d294a0c7c257e83f..5fbf081731d7d262ee38a96932e1dbef04e5e9d0 100644 (file)
@@ -11,4 +11,4 @@ Requires=nvmf-connect.target
 [Service]
 Type=simple
 Environment="CONNECT_ARGS=%i"
-ExecStart=/bin/sh -c "nvme connect-all --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
+ExecStart=/bin/sh -c "nvme connect-all --matching --quiet `/bin/echo -e '${CONNECT_ARGS}'`"