This commit is contained in:
committed by
Git OBS Bridge
parent
8c3a71f07e
commit
768e3875db
10
boot.md
10
boot.md
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user