aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit4
1 files changed, 4 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index b57d2bc3..e1658315 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -158,8 +158,12 @@ init_crypto() {
elif [ "${src/^\/dev\/disk\/by-uuid\/}" != "$src" ]; then
src=$(__readlink $src)
fi
+ # Does it exist?
[ -z "$src" ] && continue
+ # Is it a block device?
[ -b "$src" ] || continue
+ # Is it already a device mapper slave? (this is gross)
+ [[ " $(ls /sys/block/dm-*/slaves) " =~ " ${src##/dev/} " ]] && continue
# Parse the options field, convert to cryptsetup parameters
# and contruct the command line
while [ -n "$opt" ]; do