Re: [PATCH 32/35] nvmf-autoconnect: add unit file for nvme-monitor.service

Sagi Grimberg
2021-01-29T19:09:04Z

> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
> nvmf-autoconnect/systemd/nvme-monitor.service | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
> create mode 100644 nvmf-autoconnect/systemd/nvme-monitor.service
>
> diff --git a/nvmf-autoconnect/systemd/nvme-monitor.service b/nvmf-autoconnect/systemd/nvme-monitor.service
> new file mode 100644
> index 0000000..d85b133
> --- /dev/null
> +++ b/nvmf-autoconnect/systemd/nvme-monitor.service
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=NVMe Event Monitor for Automatical Subsystem Connection
> +Documentation=man:nvme-monitor(1)
> +DefaultDependencies=false
> +Requires=systemd-udevd-kernel.socket
> +RequiresMountsFor=/sys
> +Conflicts=shutdown.target
> +After=systemd-udevd-kernel.socket
> +Before=sysinit.target systemd-udev-trigger.service nvmefc-boot-connections.service
> +
> +[Service]
> +Type=simple
> +ExecStart=/usr/sbin/nvme monitor -A -p

I've seen issues with assuming nvme sits in /usr/sbin/