diff options
author | Harald Hoyer <harald@redhat.com> | 2009-08-19 17:08:57 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-08-19 17:08:57 +0200 |
commit | 9defc609e87eece19d1a26dd00b8524565608d62 (patch) | |
tree | 2956ee59844e2a284ab3ea6807b99891dd0a821a /dracut-functions | |
parent | 68b26290f0f45d4a54d9ba4752fbf715d6f6621f (diff) | |
download | dracut-9defc609e87eece19d1a26dd00b8524565608d62.tar.gz dracut-9defc609e87eece19d1a26dd00b8524565608d62.tar.bz2 dracut-9defc609e87eece19d1a26dd00b8524565608d62.zip |
dracut-functions: check for existance of slave devices before opening it
Diffstat (limited to 'dracut-functions')
-rwxr-xr-x | dracut-functions | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dracut-functions b/dracut-functions index 1df20456..75c2e10a 100755 --- a/dracut-functions +++ b/dracut-functions @@ -72,9 +72,11 @@ check_block_and_slaves() { [[ -d /sys/dev/block/$2/slaves ]] || return 1 # we want to search the tree breadthwise, so... for x in /sys/dev/block/$2/slaves/*/dev; do + [[ -f $x ]] || continue $1 $(cat "$x") && return 0 done 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 |