geom mirror and gbde
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Jan 21 06:39:29 PST 2005
On Fri, Jan 21, 2005 at 09:56:58AM +0100, Attila Nagy wrote:
+> Hello,
+>
+> I would like to use gbde on a geom mirror, but /etc/rc.d/gbde fails if
+> there is a slash in the device name.
+>
+> I don't know what would be the clean solution, I used the attached diff
+> to solve the problem.
+>
+> Please review it and if there is a better solution, commit it.
Acha! I fixed gbde(8) to accept devices with / in them, but forgot about
rc.d/gbde.
+> @@ -81,16 +81,17 @@
+> for device in $gbde_devices; do
+> parent=${device%.bde}
+> parent=${parent#/dev/}
+> - eval "lock=\${gbde_lock_${parent}-\"${gbde_lockdir}/${parent}.lock\"}"
+> + parent_=`echo ${parent} | sed "s/\//_/g"`
+> + eval "lock=\${gbde_lock_${parent_}-\"${gbde_lockdir}/${parent_}.lock\"}"
+> if [ -e "/dev/${parent}" -a ! -e "/dev/${parent}.bde" ]; then
+> echo "Configuring Disk Encryption for ${parent}."
Only this part is needed.
Committed to HEAD, MFC after 1 week. Thanks!
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050121/3d609054/attachment.bin
More information about the freebsd-hackers
mailing list