View | Details | Raw Unified
Collapse All | Expand All

(-) /lib/rcscripts/addons/raid-stop.sh (-3 / +10 lines)
 Lines 38-45    Link Here 
fi
fi
# Start software raid with mdadm (new school)
# Start software raid with mdadm (new school)
if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then
if [[ -x /sbin/mdadm && ( -f /etc/mdadm.conf || -f /etc/mdadm/mdadm.conf ) ]] ; then
	devs=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf)
	mdadmconf="/etc/mdadm.conf"
	if [[ -f /etc/mdadm.conf && -f /etc/mdadm/mdadm.conf ]] ; then
		diff /etc/mdadm.conf /etc/mdadm/mdadm.conf >/dev/null || ewarn "/etc/mdadm.conf differs from /etc/mdadm/mdadm.conf, going to use /etc/mdadm.conf"
	fi
	if [[ ! ( -f /etc/mdadm.conf ) ]] ; then
		mdadmconf="/etc/mdadm/mdadm.conf"
	fi
	devs=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' $mdadmconf)
	if [[ -n ${devs} ]] ; then
	if [[ -n ${devs} ]] ; then
		create_devs ${devs}
		create_devs ${devs}
		ebegin "Starting up RAID devices (mdadm)"
		ebegin "Starting up RAID devices (mdadm)"
 Lines 15-21    Link Here 
fi
fi
# Stop software raid with mdadm (new school)
# Stop software raid with mdadm (new school)
if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then
if [[ -x /sbin/mdadm && ( -f /etc/mdadm.conf || -f /etc/mdadm/mdadm.conf ) ]] ; then
	ebegin "Shutting down RAID devices (mdadm)"
	ebegin "Shutting down RAID devices (mdadm)"
	output=$(mdadm -Ss 2>&1)
	output=$(mdadm -Ss 2>&1)
	ret=$?
	ret=$?