Fix swraid for config which do not have any raid devices.
svn path=/nixos/trunk/; revision=21800
This commit is contained in:
parent
49dcb07bd9
commit
1f2db38e9a
|
@ -45,8 +45,9 @@ in
|
|||
# Scan /proc/partitions for RAID devices.
|
||||
${mdadm}/sbin/mdadm --examine --brief --scan -c partitions > ${tempConf}
|
||||
|
||||
# If the status has changed.
|
||||
if ! ${diffutils}/bin/diff -q /proc/mdstat ${tempStatus} > /dev/null; then
|
||||
# If there is some array to assemble and if the status has changed.
|
||||
if test -e /proc/mdstat -a -s ${tempConf} &&
|
||||
! ${diffutils}/bin/diff -q /proc/mdstat ${tempStatus} > /dev/null; then
|
||||
|
||||
# Keep the previous status to watch changes.
|
||||
cp ${tempStatus} ${tempStatus}.old
|
||||
|
|
Loading…
Reference in a new issue