summaryrefslogtreecommitdiff
path: root/dracut-functions
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-08-19 17:08:57 +0200
committerHarald Hoyer <harald@redhat.com>2009-08-19 17:08:57 +0200
commit9defc609e87eece19d1a26dd00b8524565608d62 (patch)
tree2956ee59844e2a284ab3ea6807b99891dd0a821a /dracut-functions
parent68b26290f0f45d4a54d9ba4752fbf715d6f6621f (diff)
downloaddracut-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-xdracut-functions2
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