# For people who run raid on top of some other layer (like
# dmcrypt), use rc_need to specify that requirement. See
# the runscript(8) man page for more information.
+
+# Most configuration happens in /etc/mdadm.conf.
+
+# Pass additional options when assembling raids.
+# Note: This applies to all raids.
+MDADM_ASSEMBLE_OPTS=""
#!/bin/sh
+# This requires that AUTOCHECK is true in /etc/default/mdadm
if [ -x /usr/sbin/checkarray ] && [ $(date +\%d) -le 7 ]; then
/usr/sbin/checkarray --cron --all --idle --quiet
fi
--- /dev/null
+# Based on Debian /etc/default/mdadm
+
+# Gentoo comment: The cronjob checks for this value to decide to actually
+# validate arrays. If missing, it does NOT actually do anything.
+# AUTOCHECK:
+# should mdadm run periodic redundancy checks over your arrays? See
+# /etc/cron.weekly/mdadm
+
+#AUTOCHECK=true
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2006 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdadm.rc,v 1.2 2006/04/25 05:41:51 vapier Exp $
+# $Id$
depend() {
use logger dns net
-#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdraid.rc,v 1.6 2011/11/12 21:06:44 vapier Exp $
+# $Id$
depend() {
before checkfs fsck
local output
ebegin "Starting up RAID devices"
- output=$(mdadm -As 2>&1)
+ output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1)
eend $? "${output}"
local pat="/dev/md_d*"
# ARRAY lines specify information about how to identify arrays so
# so that they can be activated
#
-# You can have more than one device line and use wild cards. The first
+# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
-# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1