From: Hannes Reinecke Date: Wed, 22 Jan 2020 07:45:18 +0000 (+0100) Subject: nvmf-autoconnect.service X-Git-Tag: v1.11~47 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c28523e76544fb44a9b6d7aa40e42bc5ffea256e;p=users%2Fhch%2Fnvme-cli.git nvmf-autoconnect.service Add a systemd service to automatically start 'nvme connect-all' upon booting if an /etc/nvme/discovery.conf file exists. The 'nvme-tcp' or 'nvme-rdma' modules need to be loaded earlier by eg the modules-load service. Signed-off-by: Hannes Reinecke --- diff --git a/nvmf-autoconnect/systemd/nvmf-autoconnect.service b/nvmf-autoconnect/systemd/nvmf-autoconnect.service new file mode 100644 index 0000000..2690467 --- /dev/null +++ b/nvmf-autoconnect/systemd/nvmf-autoconnect.service @@ -0,0 +1,12 @@ +[Unit] +Description=Connect NVMe-oF subsystems automatically during boot +ConditionPathExists=/etc/nvme/discovery.conf +After=network.target +Before=remote-fs-pre.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/nvme connect-all + +[Install] +WantedBy=default.target