substs.set('BINDIR', bindir)
substs.set('SBINDIR', sbindir)
substs.set('SYSCONFDIR', sysconfdir)
+substs.set('SYSTEMCTL', get_option('systemctl'))
configure_file(
input: 'nvme.spec.in',
option('dracutrulesdir', type : 'string', value : 'lib/dracut/dracut.conf.d/', description : 'directory for dracut rules files')
option('systemddir', type : 'string', value : 'lib/systemd/', description : 'directory for systemd files')
option('htmldir', type : 'string', value : '', description : 'directory for HTML documentation')
+option('systemctl', type : 'string', value : '/usr/bin/systemctl', description : 'path to systemctl binary')
option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation')
option('docs-build', type : 'boolean', value : false, description : 'build documentation')
ACTION=="change", SUBSYSTEM=="nvme", ENV{NVME_AEN}=="0x70f002",\
ENV{NVME_TRTYPE}=="*", ENV{NVME_TRADDR}=="*", \
ENV{NVME_TRSVCID}=="*", ENV{NVME_HOST_TRADDR}=="*", \
- RUN+="/bin/systemctl --no-block start nvmf-connect@--device=$kernel\t--transport=$env{NVME_TRTYPE}\t--traddr=$env{NVME_TRADDR}\t--trsvcid=$env{NVME_TRSVCID}\t--host-traddr=$env{NVME_HOST_TRADDR}.service"
+ RUN+="@SYSTEMCTL@ --no-block start nvmf-connect@--device=$kernel\t--transport=$env{NVME_TRTYPE}\t--traddr=$env{NVME_TRADDR}\t--trsvcid=$env{NVME_TRSVCID}\t--host-traddr=$env{NVME_HOST_TRADDR}.service"
# nvme-fc transport generated events (old-style for compatibility)
ACTION=="change", SUBSYSTEM=="fc", ENV{FC_EVENT}=="nvmediscovery", \
ENV{NVMEFC_HOST_TRADDR}=="*", ENV{NVMEFC_TRADDR}=="*", \
- RUN+="/bin/systemctl --no-block start nvmf-connect@--device=none\t--transport=fc\t--traddr=$env{NVMEFC_TRADDR}\t--trsvcid=none\t--host-traddr=$env{NVMEFC_HOST_TRADDR}.service"
+ RUN+="@SYSTEMCTL@ --no-block start nvmf-connect@--device=none\t--transport=fc\t--traddr=$env{NVMEFC_TRADDR}\t--trsvcid=none\t--host-traddr=$env{NVMEFC_HOST_TRADDR}.service"