From owner-freebsd-hackers Mon Oct 28 3:58: 5 2002 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 E84C437B401 for ; Mon, 28 Oct 2002 03:58:03 -0800 (PST) Received: from straylight.ringlet.net (office.sbnd.net [217.75.140.130]) by mx1.FreeBSD.org (Postfix) with SMTP id 432C643E7B for ; Mon, 28 Oct 2002 03:58:00 -0800 (PST) (envelope-from roam@ringlet.net) Received: (qmail 25542 invoked by uid 1000); 28 Oct 2002 11:57:22 -0000 Date: Mon, 28 Oct 2002 13:57:22 +0200 From: Peter Pentchev To: Dominic Mitchell Cc: Baldur Gislason , Robert Withrow , freebsd-hackers@FreeBSD.ORG Subject: Re: Suggestion: usbd.conf uses rc.conf for options Message-ID: <20021028115722.GB17000@straylight.oblivion.bg> Mail-Followup-To: Dominic Mitchell , Baldur Gislason , Robert Withrow , freebsd-hackers@FreeBSD.ORG References: <20021027193323.C76EA32B3@ns1.rwwa.com> <20021027194710.6AA69AB93@tesla.foo.is> <3DBD2442.5050602@semantico.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline In-Reply-To: <3DBD2442.5050602@semantico.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 28, 2002 at 11:49:22AM +0000, Dominic Mitchell wrote: > Baldur Gislason wrote: > >I agree, that would be a nice feature in usbd, but a workaround to gain= =20 > >the same functionality would be: > > > >attach "/usr/sbin/moused `/usr/bin/perl -e 'while(<>) { $foo =3D $_ . $f= oo;=20 > >} if($foo =3D~ /^moused_flags=3D"(.*?)"$/im) { print $1; }' < /etc/rc.co= nf` -p=20 > >/dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid" >=20 > Why not just: >=20 > attach ". /etc/rc.conf; /usr/bin/moused ${moused_flags} -p=20 > /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid" >=20 > (untested) This had better be ". /etc/defaults/rc.conf; source_rc_confs; ..." :) I have been thinking for quite some time of writing a little utility that parses various configuration file mechanisms and allows the administrator to specify which config mechanism to use for which program. I have a simple design in mind, which would allow direct variable setting, use of /etc/rc.conf, use of other configuration files, use of daemontools-style envdirs, and a couple of others, but so far, there has been no time to actually start writing a simple proof-of-concept thing. Funny now, the timing; I was thinking of writing up a simple rcenv(1) today or tomorrow, and then I saw this thread :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 No language can express every thought unambiguously, least of all this one. --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE9vSYi7Ri2jRYZRVMRApvpAKC5xbu+5HtAbtbOJBgk4uhAnzyOFgCfVOjM cAVCpBuMRSIAoo5rpWYKZL8= =yELm -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message