Skip to content

Commit 7a3866f

Browse files
author
Thomas Rosenstein
committed
feat(mdadm): configure mdadm.conf path for use with extensionconfig
1 parent b48d3a6 commit 7a3866f

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

storage/mdadm/files/udev-md-raid-arrays.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TEST!="md/array_state", GOTO="md_end"
1717
ATTR{md/array_state}=="clear*|inactive", GOTO="md_end"
1818
LABEL="md_ignore_state"
1919

20-
IMPORT{program}="/usr/local/sbin/mdadm --detail --no-devices --export $devnode"
20+
IMPORT{program}="/usr/local/sbin/mdadm --detail -c /usr/local/etc/mdadm.conf --no-devices --export $devnode"
2121
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
2222
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
2323
ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"

storage/mdadm/files/udev-md-raid-assembly.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LABEL="md_inc"
2323

2424
# remember you can limit what gets auto/incrementally assembled by
2525
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
26-
ACTION=="add|change", IMPORT{program}="/usr/local/sbin/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
26+
ACTION=="add|change", IMPORT{program}="/usr/local/sbin/mdadm --incremental -c /usr/local/etc/mdadm.conf --export $devnode --offroot $env{DEVLINKS}"
2727
ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/usr/local/sbin/mdadm -If $name --path $env{ID_PATH}"
2828
ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/usr/local/sbin/mdadm -If $name"
2929

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- mdadm.orig/Makefile
2+
+++ mdadm/Makefile
3+
@@ -89,7 +89,7 @@
4+
5+
PKG_CONFIG ?= pkg-config
6+
7+
-SYSCONFDIR = /etc
8+
+SYSCONFDIR = /usr/local/etc
9+
CONFFILE = $(SYSCONFDIR)/mdadm.conf
10+
CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf
11+
MAILCMD =/usr/sbin/sendmail -t

storage/mdadm/pkg.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ steps:
2121
patch -p1 < /pkg/patches/no-werror.patch
2222
patch -p1 < /pkg/patches/musl-125.patch
2323
patch -p1 < /pkg/patches/exit-gracefully-when-md-device-not-found.patch
24+
patch -p1 < /pkg/patches/change-sysconfdir.patch
2425
build:
2526
- |
2627
mkdir -p /run/mdadm
2728
2829
CXFLAGS=-D_LARGEFILE64_SOURCE \
30+
2931
make -j $(nproc) mdadm
3032
make -j $(nproc) mdmon
3133
install:

0 commit comments

Comments
 (0)