]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
spec, make: Add discovery.conf to the package files list
authorSagi Grimberg <sagi@grimberg.me>
Wed, 24 Apr 2019 21:49:42 +0000 (14:49 -0700)
committerKeith Busch <keith.busch@intel.com>
Thu, 25 Apr 2019 14:59:24 +0000 (08:59 -0600)
Lets add it as part of the package with a little documentation.

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Makefile
etc/discovery.conf.in [new file with mode: 0644]
nvme.spec.in

index 02299c45734fd578fb6099f4b47677d18cf8c210..4bfbebbd156a6f2758345a7a7c934cfb6d1627dd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,9 @@ install-etc:
        $(INSTALL) -d $(DESTDIR)$(SYSCONFDIR)/nvme
        touch $(DESTDIR)$(SYSCONFDIR)/nvme/hostnqn
        touch $(DESTDIR)$(SYSCONFDIR)/nvme/hostid
+       if [ ! -f $(DESTDIR)$(SBINDIR)/nvme/discovery.conf ]; then \
+               $(INSTALL) -m 644 -T ./etc/discovery.conf.in $(DESTDIR)$(SYSCONFDIR)/nvme/discovery.conf; \
+       fi
 
 install-spec: install-bin install-man install-bash-completion install-zsh-completion install-etc
 install: install-spec install-hostparams
diff --git a/etc/discovery.conf.in b/etc/discovery.conf.in
new file mode 100644 (file)
index 0000000..14e0d9c
--- /dev/null
@@ -0,0 +1,4 @@
+# Used for extracting default parameters for discovery
+#
+# Example:
+# --transport=<trtype> --traddr=<traddr> --trsvcid=<trsvcid> --host-traddr=<host-traddr>
index 147b64a530f8ae01db51b95f418184096a93f057..6934f8fd605b262984bf9095b167abd78798319d 100644 (file)
@@ -34,6 +34,7 @@ make install-spec DESTDIR=%{buildroot} PREFIX=/usr
 %dir %{_sysconfdir}/nvme
 %{_sysconfdir}/nvme/hostnqn
 %{_sysconfdir}/nvme/hostid
+%{_sysconfdir}/nvme/discovery.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT