Lock file for gbde devices is optional.

This commit is contained in:
Pawel Jakub Dawidek 2004-10-06 14:42:35 +00:00
parent 401901ac43
commit 1446307aaa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136193

View File

@ -82,12 +82,16 @@ gbde_start()
parentdev=${device%.bde}
parent=${parentdev#/dev/}
eval "lock=\${gbde_lock_${parent}-\"${gbde_lockdir}/${parent}.lock\"}"
if [ -e "${lock}" -a ! -e "${device}" ]; then
if [ ! -e "${device}" ]; then
echo "Configuring Disk Encryption for ${device}."
count=1
while [ ${count} -le ${gbde_attach_attempts} ]; do
gbde attach ${parentdev} -l ${lock}
if [ -e "${lock}" ]; then
gbde attach ${parentdev} -l ${lock}
else
gbde attach ${parentdev}
fi
if [ -e ${device} ]; then
break
fi