OBS User unknown
2008-01-24 17:30:41 +00:00
committed by Git OBS Bridge
parent 8c3a71f07e
commit 768e3875db
5 changed files with 81 additions and 230 deletions

10
boot.md
View File

@@ -116,8 +116,8 @@ case "$1" in
/sbin/udevsettle --timeout="$MDADM_DEVICE_TIMEOUT"
fi
if test "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -s "$mdadm_CONFIG"; then
if ! grep -q '[^[:blank:]]' $mdadm_CONFIG; then
if test "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -e "$mdadm_CONFIG"; then
if ! grep -q '^[^#]*[^[:blank:]#]' $mdadm_CONFIG; then
# empty /etc/mdadm.conf, "unused"
rc_status -u
fi
@@ -127,12 +127,14 @@ case "$1" in
fi
else
# do auto-assemly only if /etc/mdadm.conf is missing
rm -f /tmp/mdadm.conf
# run at boot-time, so a fixed tmp name is safe
rm -rf /tmp/mdadm.conf
if ! mdadm --examine --scan --config=partitions >/tmp/mdadm.conf
then
rc_failed 1
rc_status -v
fi
chmod 0600 /tmp/mdadm.conf
if test -s /tmp/mdadm.conf; then
if ! mdadm --assemble --scan --config=/tmp/mdadm.conf
then
@@ -140,7 +142,7 @@ case "$1" in
rc_status -v
fi
else
# partitions found, "unused"
# no partitions found, "unused"
rc_status -u
fi