Blame SOURCES/rhel-dmraid-activation

325406
#!/bin/bash
325406
#
325406
# Activation of dmraid sets.
325406
#
325406
. /etc/init.d/functions
325406
325406
[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline)
325406
325406
if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
325406
	modprobe dm-mirror >/dev/null 2>&1
325406
	dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
325406
	if [ "$?" = "0" ]; then
325406
		SAVEIFS=$IFS
325406
		IFS=$(echo -en "\n\b")
325406
		for dmname in $dmraidsets; do
325406
			if [[ "$dmname" == isw_* ]] && \
325406
			   ! strstr "$cmdline" noiswmd; then
325406
				continue
325406
			fi
325406
			/sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1
325406
			/sbin/kpartx -u -a "/dev/mapper/$dmname"
325406
		done
325406
		IFS=$SAVEIFS
325406
	fi
325406
fi