if xmlto.found()
foreach adoc : adoc_sources
input = adoc + '.txt'
+ subst = configure_file(
+ input: adoc + '.txt',
+ output: adoc + '.msubst',
+ configuration: substs)
xml = custom_target(
adoc.underscorify() + '_xml',
- input: adoc + '.txt',
+ input: subst,
output: '@BASENAME@.xml',
command: [asciidoctor,
'-f', files('asciidoc.conf'),
if want_docs == 'all' or want_docs == 'html'
foreach adoc : adoc_sources
input = adoc + '.txt'
+ subst = configure_file(
+ input: adoc + '.txt',
+ output: adoc + '.hsubst',
+ configuration: substs)
custom_target(
adoc.underscorify() + '_html',
- input: adoc + '.txt',
+ input: subst,
output: '@BASENAME@.html',
command: [asciidoctor,
'-f', files('asciidoc.conf'),
Controller, and create controllers for the returned discovery records.
If no parameters are given, then 'nvme connect-all' will attempt to
-find a /etc/nvme/discovery.conf file to use to supply a list of
-connect-all commands to run. If no /etc/nvme/discovery.conf file exists,
-the command will quit with an error.
+find a @SYSCONFDIR@/nvme/discovery.conf file to use to supply a list of
+connect-all commands to run. If no @SYSCONFDIR@/nvme/discovery.conf file
+exists, the command will quit with an error.
Otherwise a specific Discovery Controller should be specified using the
--transport, --traddr and if necessary the --trsvcid and a Diѕcovery
--hostnqn=<hostnqn>::
Overrides the default Host NQN that identifies the NVMe Host.
If this option is not specified, the default is read from
- /etc/nvme/hostnqn first. If that does not exist, the autogenerated
- NQN value from the NVMe Host kernel module is used next.
+ @SYSCONFDIR@/nvme/hostnqn first. If that does not exist, the
+ autogenerated NQN value from the NVMe Host kernel module is used next.
The Host NQN uniquely identifies the NVMe Host, and may be used by the
the Discovery Controller to control what NVMe Target resources are
allocated to the NVMe Host for a connection.
-C <cfg>::
--config-file=<cfg>::
Use the specified JSON configuration file instead of the
- default /etc/nvme/config.json file or 'none' to not read in
+ default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
format is documented in
https://github.com/linux-nvme/libnvme/doc/config-schema.json
--hostnqn=host1-rogue-nqn
------------
+
-* Issue a 'nvme connect-all' command using a /etc/nvme/discovery.conf file:
+* Issue a 'nvme connect-all' command using a @SYSCONFDIR@/nvme/discovery.conf file:
+
-----------
# Machine default 'nvme discover' commands. Query the
--hostnqn=<hostnqn>::
Overrides the default Host NQN that identifies the NVMe Host.
If this option is not specified, the default is read from
- /etc/nvme/hostnqn first. If that does not exist, the autogenerated
+ @SYSCONFDIR@/nvme/hostnqn first. If that does not exist, the autogenerated
NQN value from the NVMe Host kernel module is used next.
The Host NQN uniquely identifies the NVMe Host.
-J <cfg>::
--config-file=<cfg>::
Use the specified JSON configuration file instead of the
- default /etc/nvme/config.json file or 'none' to not read in
+ default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
format is documented in
https://github.com/linux-nvme/libnvme/doc/config-schema.json
NVMe In-band authentication secret; needs to be in ASCII format as
specified in NVMe 2.0 section 8.13.5.8 'Secret representation'.
If this option is not specified, the default is read from
- /etc/nvme/hostkey. If that does not exist no in-band authentication
+ @SYSCONFDIR@/nvme/hostkey. If that does not exist no in-band authentication
is attempted.
-C <secret>::
Controller.
If no parameters are given, then 'nvme discover' will attempt to
-find a /etc/nvme/discovery.conf file to use to supply a list of
-Discovery commands to run. If no /etc/nvme/discovery.conf file
+find a @SYSCONFDIR@/nvme/discovery.conf file to use to supply a list of
+Discovery commands to run. If no @SYSCONFDIR@/nvme/discovery.conf file
exists, the command will quit with an error.
Otherwise, a specific Discovery Controller should be specified using the
--hostnqn=<hostnqn>::
Overrides the default host NQN that identifies the NVMe Host.
If this option is not specified, the default is read from
- /etc/nvme/hostnqn first. If that does not exist, the autogenerated
- NQN value from the NVMe Host kernel module is used next.
+ @SYSCONFDIR@/nvme/hostnqn first. If that does not exist, the
+ autogenerated NQN value from the NVMe Host kernel module is used next.
-I <hostid>::
--hostid=<hostid>::
-C <cfg>::
--config-file=<cfg>::
Use the specified JSON configuration file instead of the
- default /etc/nvme/config.json file or 'none' to not read in
+ default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
format is documented in
https://github.com/linux-nvme/libnvme/doc/config-schema.json
--hostnqn=host1-rogue-nqn
------------
+
-* Issue a 'nvme discover' command using a /etc/nvme/discovery.conf file:
+* Issue a 'nvme discover' command using a @SYSCONFDIR@/nvme/discovery.conf file:
+
-----------
# Machine default 'nvme discover' commands. Query the
DESCRIPTION
-----------
-Show the host NQN configured for the system. If /etc/nvme/hostnqn is
+Show the host NQN configured for the system. If @SYSCONFDIR@/nvme/hostnqn is
not present and systemd application-specific machine IDs are available,
this will show the systemd-generated host NQN for the system.
#include "libnvme.h"
#include "nvme-print.h"
-#define PATH_NVMF_DISC "/etc/nvme/discovery.conf"
-#define PATH_NVMF_CONFIG "/etc/nvme/config.json"
+#define PATH_NVMF_DISC "SYSCONFDIR/nvme/discovery.conf"
+#define PATH_NVMF_CONFIG "SYSCONFDIR/nvme/config.json"
#define MAX_DISC_ARGS 32
#define MAX_DISC_RETRIES 10
datadir = join_paths(prefixdir, get_option('datadir'))
mandir = join_paths(prefixdir, get_option('mandir'))
bindir = join_paths(prefixdir, get_option('bindir'))
+sbindir = join_paths(prefixdir, get_option('sbindir'))
sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
udevrulesdir = join_paths(prefixdir, get_option('udevrulesdir'))
conf = configuration_data()
requires = ''
+conf.set('SYSCONFDIR', sysconfdir)
+
libnvme_dep = dependency('libnvme', fallback : ['libnvme', 'libnvme_dep'])
# Check for libuuid availability