1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Only try to attach if parent device actually exists.

I used ugly "/dev/${parent}" instead of "${parentdev}", because "/dev/"
prefix for devices listed in gbde_devices variable is optional.

Reported by:	Sean McNeil <sean@mcneil.com>
This commit is contained in:
Pawel Jakub Dawidek 2004-10-07 06:00:06 +00:00
parent cf0684ae6f
commit 58a038b845
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136209

View File

@ -82,7 +82,7 @@ gbde_start()
parentdev=${device%.bde}
parent=${parentdev#/dev/}
eval "lock=\${gbde_lock_${parent}-\"${gbde_lockdir}/${parent}.lock\"}"
if [ ! -e "${device}" ]; then
if [ -e "/dev/${parent}" -a ! -e "${device}" ]; then
echo "Configuring Disk Encryption for ${device}."
count=1