summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/gbde
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2004-07-18 18:01:48 +0000
committersimon <simon@FreeBSD.org>2004-07-18 18:01:48 +0000
commit0fcf2627f6d8eaa33779afeb44b5efe8d7e56fda (patch)
tree68e19c3cb68c61298cbc0f27f8ee6e10b1f9031a /etc/rc.d/gbde
parent663921669569e0293fdbf9e48f017becabdf499a (diff)
downloadFreeBSD-src-0fcf2627f6d8eaa33779afeb44b5efe8d7e56fda.zip
FreeBSD-src-0fcf2627f6d8eaa33779afeb44b5efe8d7e56fda.tar.gz
For the gbde attach script:
- Ask the user up to X times (3 by default) for the pass-phrase, if it is incorrect the first time. - Add support for storing the lockfiles in another other directory than /etc. - Document that it is possible to override the location of each single lockfile. Approved by: pjd
Diffstat (limited to 'etc/rc.d/gbde')
-rw-r--r--etc/rc.d/gbde16
1 files changed, 13 insertions, 3 deletions
diff --git a/etc/rc.d/gbde b/etc/rc.d/gbde
index 25bcd2a..6359f41 100644
--- a/etc/rc.d/gbde
+++ b/etc/rc.d/gbde
@@ -81,10 +81,20 @@ gbde_start()
for device in $gbde_devices; do
parentdev=${device%.bde}
parent=${parentdev#/dev/}
- eval "lock=\${gbde_lock_${parent}-\"/etc/${parent}.lock\"}"
- if [ -e $lock ]; then
+ eval "lock=\${gbde_lock_${parent}-\"${gbde_lockdir}/${parent}.lock\"}"
+ if [ -e "${lock}" -a ! -e "${device}" ]; then
echo "Configuring Disk Encryption for ${device}."
- gbde attach ${parentdev} -l ${lock}
+
+ count=1
+ while [ ${count} -le ${gbde_attach_attempts} ]; do
+ gbde attach ${parentdev} -l ${lock}
+ if [ -e ${device} ]; then
+ break
+ fi
+ echo "Attach failed; attempt ${count} of ${gbde_attach_attempts}."
+ count=$((${count} + 1))
+ done
+
fi
done
}
OpenPOWER on IntegriCloud