Merge #301081: mdadm: Fix hardcoded directory
This commit is contained in:
commit
8e9118f7b7
2 changed files with 18 additions and 2 deletions
|
@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-QWcnrh8QgOpuMJDOo23QdoJvw2kVHjarc2VXupIZb58=";
|
||||
};
|
||||
|
||||
patches = [ ./no-self-references.patch ];
|
||||
patches = [
|
||||
./no-self-references.patch
|
||||
./fix-hardcoded-mapdir.patch
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"NIXOS=1" "INSTALL=install" "BINDIR=$(out)/sbin"
|
||||
|
@ -46,7 +49,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "Programs for managing RAID arrays under Linux";
|
||||
homepage = "http://neil.brown.name/blog/mdadm";
|
||||
homepage = "https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git";
|
||||
license = licenses.gpl2;
|
||||
mainProgram = "mdadm";
|
||||
maintainers = with maintainers; [ ekleog ];
|
||||
|
|
13
pkgs/os-specific/linux/mdadm/fix-hardcoded-mapdir.patch
Normal file
13
pkgs/os-specific/linux/mdadm/fix-hardcoded-mapdir.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/udev.c b/udev.c
|
||||
index bc4722b0..aa2a1a24 100644
|
||||
--- a/udev.c
|
||||
+++ b/udev.c
|
||||
@@ -167,7 +167,7 @@ enum udev_status udev_block(char *devnm)
|
||||
int fd;
|
||||
char *path = xcalloc(1, BUFSIZ);
|
||||
|
||||
- snprintf(path, BUFSIZ, "/run/mdadm/creating-%s", devnm);
|
||||
+ snprintf(path, BUFSIZ, "%s/creating-%s", MAP_DIR, devnm);
|
||||
|
||||
fd = open(path, O_CREAT | O_RDWR, 0600);
|
||||
if (!is_fd_valid(fd)) {
|
Loading…
Reference in a new issue