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.
|
# Scan /proc/partitions for RAID devices.
|
||||||
${mdadm}/sbin/mdadm --examine --brief --scan -c partitions > ${tempConf}
|
${mdadm}/sbin/mdadm --examine --brief --scan -c partitions > ${tempConf}
|
||||||
|
|
||||||
# If the status has changed.
|
# If there is some array to assemble and if the status has changed.
|
||||||
if ! ${diffutils}/bin/diff -q /proc/mdstat ${tempStatus} > /dev/null; then
|
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.
|
# Keep the previous status to watch changes.
|
||||||
cp ${tempStatus} ${tempStatus}.old
|
cp ${tempStatus} ${tempStatus}.old
|
||||||
|
Loading…
x
Reference in New Issue
Block a user