summaryrefslogtreecommitdiffstats
path: root/nvmf-autoconnect/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'nvmf-autoconnect/systemd')
-rw-r--r--nvmf-autoconnect/systemd/nvmf-autoconnect.service.in3
-rw-r--r--nvmf-autoconnect/systemd/nvmf-connect-nbft.service.in14
2 files changed, 16 insertions, 1 deletions
diff --git a/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in b/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in
index 621879a..92960cd 100644
--- a/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in
+++ b/nvmf-autoconnect/systemd/nvmf-autoconnect.service.in
@@ -2,12 +2,13 @@
Description=Connect NVMe-oF subsystems automatically during boot
ConditionPathExists=|@SYSCONFDIR@/nvme/config.json
ConditionPathExists=|@SYSCONFDIR@/nvme/discovery.conf
+Wants=modprobe@nvme_fabrics.service
+After=modprobe@nvme_fabrics.service
After=network-online.target
Before=remote-fs-pre.target
[Service]
Type=oneshot
-ExecStartPre=/sbin/modprobe nvme-fabrics
ExecStart=@SBINDIR@/nvme connect-all --context=autoconnect
[Install]
diff --git a/nvmf-autoconnect/systemd/nvmf-connect-nbft.service.in b/nvmf-autoconnect/systemd/nvmf-connect-nbft.service.in
new file mode 100644
index 0000000..820e6ce
--- /dev/null
+++ b/nvmf-autoconnect/systemd/nvmf-connect-nbft.service.in
@@ -0,0 +1,14 @@
+# This unit is meant to be started by network management software
+# after a network interface defined in the NBFT gets set up
+[Unit]
+Description=Connect NBFT-defined NVMe-oF subsystems automatically
+ConditionPathExists=|/sys/firmware/acpi/tables/NBFT
+ConditionPathExists=|/sys/firmware/acpi/tables/NBFT1
+Wants=modprobe@nvme_fabrics.service
+After=modprobe@nvme_fabrics.service
+After=network-online.target
+Before=remote-fs-pre.target
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/nvme connect-all --nbft