Unverified Commit 8e9118f7 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge #301081: mdadm: Fix hardcoded directory

parents 7d892036 49e6c686
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
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)) {