Revert "dracut-functions: $_x should exist, no need to test."

This reverts commit b2d225a669.

When there's no /sys/dev/block/$2/slaves/*/dev/ exists, $_x will
be assigned with '/sys/dev/block/$2/slaves/*/dev/', this is invalid.
That commit will lead to some warn msg like:
cat: /sys/dev/block/8:16/slaves/*/dev: No such file or directory
cat: /sys/dev/block/8:32/slaves/*/dev: No such file or directory
This commit is contained in:
Chao Wang 2012-08-01 11:23:42 +08:00 committed by Harald Hoyer
parent 5545fc3046
commit d82e0d7dd8

View File

@ -423,6 +423,7 @@ check_block_and_slaves() {
fi
[[ -d /sys/dev/block/$2/slaves ]] || return 1
for _x in /sys/dev/block/$2/slaves/*/dev; do
[[ -f $_x ]] || continue
check_block_and_slaves $1 $(cat "$_x") && return 0
done
return 1