Skip to contentSkip to conversation

nvme-cli: Fix systemd service script use of CONNECT_ARGS env var

PATCH In review James Smart 3 participants 3 messages Dec 19, 2019 – Jan 7, 2020 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-cli: Fix systemd service script use of CONNECT_ARGS env var

In testing, some environments are not properly expanding CONNECT_ARGS.

Change systemd service file use of CONNECT_ARGS to be encapsulated by apostrophes and parens.

---
 nvmf-autoconnect/systemd/[email protected] | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
nvmf-autoconnect/systemd/[email protected] +1 -1
index 10fb3aa..c60f146 100644
@@ -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 --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
Signature · 7 lines
2.13.7


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
#1 lore raw

ping...

Quoted 15 lines · James Smart

In testing, some environments are not properly expanding CONNECT_ARGS.

Change systemd service file use of CONNECT_ARGS to be encapsulated by apostrophes and parens.

---
  nvmf-autoconnect/systemd/[email protected] | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
nvmf-autoconnect/systemd/[email protected] +0 -0
index 10fb3aa..c60f146 100644

nvmf-autoconnect/systemd/[email protected] Requires=nvmf-connect.target · line 14

Quoted 5 lines
nvmf-autoconnect/systemd/[email protected] +1 -1
@@ -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 --quiet `/bin/echo -e '${CONNECT_ARGS}'`"

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme