diff options
author | Bill Nottingham <notting@redhat.com> | 2008-10-17 16:25:47 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-10-17 16:25:47 -0400 |
commit | 66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc (patch) | |
tree | 593f74d90298e8a3afc35644e1c3e381ee262d01 /rc.d/rc.sysinit | |
parent | 251c0bfcfdb53f2c11fcafa9381d4322a1973fc8 (diff) | |
download | initscripts-66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc.tar initscripts-66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc.tar.gz initscripts-66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc.tar.bz2 initscripts-66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc.tar.xz initscripts-66fc2646834cb7cd77837e0e4eb0ea1e2c2ebcbc.zip |
Don't set up a device that's already a device-mapper slave.
It's possible the initrd set the device up under a different LUKS name.
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-x | rc.d/rc.sysinit | 4 |
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 |