sys-fs/mdadm: Sync with Gentoo

It's from Gentoo commit 88363d5349960e09082915da4e7e5b08e379c564.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-09 07:31:52 +00:00 committed by Krzesimir Nowak
parent eea31db930
commit 370cdeb36c
3 changed files with 15 additions and 2 deletions

View File

@ -7,11 +7,24 @@ depend() {
after modules
}
assemble() {
local rv
mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1
rv=$?
if [ ${rv} -eq 2 ]; then
# mdadm exits with status 2 when there is nothing to assemble.
# This is undocumented.
# https://bugs.gentoo.org/295397
return 0
fi
return "${rv}"
}
start() {
local output
ebegin "Starting up RAID devices"
output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1)
output=$(assemble)
eend $? "${output}"
local pat="/dev/md_d*"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8