From owner-freebsd-hackers Wed Oct 7 02:31:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA19825 for freebsd-hackers-outgoing; Wed, 7 Oct 1998 02:31:15 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from at.dotat.com (zed.dotat.com [203.38.154.39]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA19819 for ; Wed, 7 Oct 1998 02:31:09 -0700 (PDT) (envelope-from hart@at.dotat.com) Received: from at.dotat.com (localhost.dotat.com [127.0.0.1]) by at.dotat.com (8.8.7/8.8.5) with ESMTP id TAA13299 for ; Wed, 7 Oct 1998 19:03:11 +0930 (CST) Message-Id: <199810070933.TAA13299@at.dotat.com> To: hackers@FreeBSD.ORG Subject: Re: sysctl for string arguments ? In-reply-to: Your message of "Wed, 07 Oct 1998 08:00:12 +0100." <199810070700.IAA08022@labinfo.iet.unipi.it> Date: Wed, 07 Oct 1998 19:03:10 +0930 From: Leigh Hart Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Luigi, Luigi Rizzo wrote: > > > other strings in sysctl args seem not to be R/W (or at least, > > > not settable with the "sysctl" command... e.g. kern.hostname and the > > > like). > > > > kern.corefile in kern_sig.c. > > ok, thanks (i was looking on -stable...) > > On this subject, it seems that sysctl on 2.2.6 at least does not accept > strings containing spaces: > > sysctl -w kern.hostname=a,b,c > > works, whereas > > sysctl -w kern.hostname="a b c" > > fails. I am not sure who does the parsing of strings removing > whitespace, nor if this works on -current Wierd - on 2.2.5 and 3.0-971006-SNAP this ("a b c") works fine ...: # sysctl -w kern.hostname="a b c" kern.hostname: duster.adelaide.on.net -> a b c # uname -a FreeBSD a b c 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Sun Apr 26 13:33:54 CST 1998 root@duster:/usr/src/sys/compile/DUSTER i386 I don't have a 2.2.6 system to try it on however... Cheers Leigh -- | "By the time they had diminished | Leigh Hart, | | from 50 to 8, the other dwarves | Dotat Communications Pty Ltd | | began to suspect 'Hungry' ..." | GPO Box 487 Adelaide SA 5001 | | -- Gary Larson, "The Far Side" | http://www.dotat.com/hart/ | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message