summary refs log tree commit diff
path: root/pkgs/os-specific/linux/multipath-tools
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2021-03-11 10:31:32 -0500
committerGraham Christensen <graham@grahamc.com>2021-03-11 10:31:42 -0500
commit94a291a5b76823d08cf909b338ee8b9d04a877dd (patch)
treea0b7ddb891c5a054bd20bbc604a6228a3f0d6f14 /pkgs/os-specific/linux/multipath-tools
parent1550a4fe6bc4e6daacba73eb305ec62492846466 (diff)
downloadnixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar.gz
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar.bz2
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar.lz
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar.xz
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.tar.zst
nixpkgs-94a291a5b76823d08cf909b338ee8b9d04a877dd.zip
multipath-tools: fix the service path to multipathd
Diffstat (limited to 'pkgs/os-specific/linux/multipath-tools')
-rw-r--r--pkgs/os-specific/linux/multipath-tools/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix
index 4784abc6c28..24149805723 100644
--- a/pkgs/os-specific/linux/multipath-tools/default.nix
+++ b/pkgs/os-specific/linux/multipath-tools/default.nix
@@ -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 {
   pname = "multipath-tools";
@@ -16,7 +16,13 @@ stdenv.mkDerivation rec {
   ];
 
   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 '
       s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
     ' libmultipath/defaults.h