mirror of
https://github.com/flatcar/scripts.git
synced 2026-03-27 08:12:26 +01:00
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:
parent
eea31db930
commit
370cdeb36c
@ -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*"
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user