multipath-tools: fix the service path to multipathd
This commit is contained in:
parent
1550a4fe6b
commit
94a291a5b7
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchurl, pkg-config, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c }:
|
{ lib, stdenv, fetchurl, pkg-config, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c, kmod }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "multipath-tools";
|
pname = "multipath-tools";
|
||||||
@ -16,7 +16,13 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lib.getDev lvm2}/include/libdevmapper.h
|
substituteInPlace libmultipath/Makefile \
|
||||||
|
--replace /usr/include/libdevmapper.h ${lib.getDev lvm2}/include/libdevmapper.h
|
||||||
|
|
||||||
|
substituteInPlace multipathd/multipathd.service \
|
||||||
|
--replace /sbin/modprobe ${lib.getBin kmod}/sbin/modprobe \
|
||||||
|
--replace /sbin/multipathd "$out/bin/multipathd"
|
||||||
|
|
||||||
sed -i -re '
|
sed -i -re '
|
||||||
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
|
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
|
||||||
' libmultipath/defaults.h
|
' libmultipath/defaults.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user