From owner-freebsd-questions@FreeBSD.ORG Sun Mar 28 01:59:29 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D4E716A4CE for ; Sun, 28 Mar 2004 01:59:29 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACC5043D41 for ; Sun, 28 Mar 2004 01:59:27 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i2S9xLSx036496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Mar 2004 10:59:21 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i2S9xKpO036495 for freebsd-questions@freebsd.org; Sun, 28 Mar 2004 10:59:20 +0100 (BST) (envelope-from matthew) Date: Sun, 28 Mar 2004 10:59:20 +0100 From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: <20040328095920.GA33245@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , freebsd-questions@freebsd.org References: <200403272013.40447.jaymo@cromagnon.cullmail.com> <200403281614.53868.malcolm.kay@internode.on.net> <4066871B.8010005@users.sourceforge.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <4066871B.8010005@users.sourceforge.net> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040316, clamav-milter version 0.67l Subject: Re: automounting cd-rom & cd-rw devices X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 09:59:29 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 28, 2004 at 05:04:43PM +0900, Rob wrote: > Remotely, I was following this discussion; I'm suprised by this solution > and I wonder how I ever would be able to find out myself about this=20 > misterious > sysctl-magic. >=20 > I did 'apropos usermount', 'man sysctl' and 'man sysctl.conf', and all di= d=20 > not > give me any hint to the above vfs.usermount solution. > Also 'sysctl -ad | grep vfs.usermount' outputs no info. >=20 > Actually, I had this feeling with other answers on this list: 'set=20 > this-or-that > sysctl variable'. I never could find any info on my FreeBSD box, to help = me > further understand. >=20 > What is this sysctl-black-magic about and where is more information? You're right that finding which sysctl is required to achieve whatever purpose can be tricky. Finding what sysctls exist is as easy as typing 'sysctl -a', but working out what they actually do -- that's a different story. sysctls are generally documented in man pages which may or may not have a title related to the name of the sysctl. Plus they are usually documented in the *programming* section of the manual, rather than the user or system administration commands sections, whose man pages come up by default if there's more than one page under the same name. Let's take the vfs.usermount sysctl as an example. That is actually documented in mount(2) -- the page describing the mount() (and umount()) syscall, not mount(8) -- the program for mounting partitions. If you type 'man mount' you'll get the mount(8) man page by default. However if you type 'man 2 mount' you find this timeless wisdom hidden within that page: By default only the super-user may call the mount() function. This restriction can be removed by setting the sysctl vfs.usermount to a no= n- zero value. How do I know where vfs.usermount is documented? Only by the rather unsatisfactory means of grepping the whole collection of man pages: % cd /usr/share/man % find . -name '*.gz' -print | xargs zgrep -l vfs.usermount (It would be really nice if the text produced by 'sysctl -d' gave you a reference to the man page(s) where the sysctl was documented.) There is a project underway to create better documentation for sysctls -- see http://lists.freebsd.org/pipermail/freebsd-doc/2004-January/003315.html See also sysctl(3) and the various header files referenced from there. --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAZqH4dtESqEQa7a0RAv5bAJ9my/cVH67ud3rjn2teOTAeeiANxwCaArsf MLUNcINf9XA8CHPDVRIe2W8= =Vt+i -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--