From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 21 14:39:28 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E07A216A4DB for ; Fri, 21 Jan 2005 14:39:28 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B55843D54 for ; Fri, 21 Jan 2005 14:39:28 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 4A169AE687; Fri, 21 Jan 2005 15:39:26 +0100 (CET) Date: Fri, 21 Jan 2005 15:39:26 +0100 From: Pawel Jakub Dawidek To: Attila Nagy Message-ID: <20050121143926.GW795@darkness.comp.waw.pl> References: <41F0C3DA.50104@fsn.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Cv++WRjpEUwHXUCE" Content-Disposition: inline In-Reply-To: <41F0C3DA.50104@fsn.hu> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: hackers@freebsd.org Subject: Re: geom mirror and gbde X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 14:39:29 -0000 --Cv++WRjpEUwHXUCE Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 21, 2005 at 09:56:58AM +0100, Attila Nagy wrote: +> Hello, +>=20 +> I would like to use gbde on a geom mirror, but /etc/rc.d/gbde fails if= =20 +> there is a slash in the device name. +>=20 +> I don't know what would be the clean solution, I used the attached diff= =20 +> to solve the problem. +>=20 +> 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=3D${device%.bde} +> parent=3D${parent#/dev/} +> - eval "lock=3D\${gbde_lock_${parent}-\"${gbde_lockdir}/${parent}.lock\= "}" +> + parent_=3D`echo ${parent} | sed "s/\//_/g"` +> + eval "lock=3D\${gbde_lock_${parent_}-\"${gbde_lockdir}/${parent_}.loc= k\"}" +> 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! --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Cv++WRjpEUwHXUCE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB8RQeForvXbEpPzQRAr+zAKC4H+dqLzmFMMXWTwuiRxMhcU8jCACfZezK 5a9l3K0MZTCI5yFCbnZsXXQ= =/KUy -----END PGP SIGNATURE----- --Cv++WRjpEUwHXUCE--