From owner-freebsd-current@FreeBSD.ORG Wed Feb 25 06:13:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A942316A4CE for ; Wed, 25 Feb 2004 06:13:44 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F25D943D41 for ; Wed, 25 Feb 2004 06:13:43 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i1PEDZ5O016451; Thu, 26 Feb 2004 01:13:35 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i1PEDX0I017785; Thu, 26 Feb 2004 01:13:34 +1100 Date: Thu, 26 Feb 2004 01:13:33 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dominic Bishop In-Reply-To: <20040225124546.AFBF043D39@mx1.FreeBSD.org> Message-ID: <20040226010010.N12139@gamplex.bde.org> References: <20040225124546.AFBF043D39@mx1.FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: kern.shutdown_timeout sysctl not working X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2004 14:13:44 -0000 On Wed, 25 Feb 2004, Dominic Bishop wrote: > I tried setting the value of the kern.shutdown_timeout sysctl and it failed > with: > > sysctl: unknown oid 'kern.shutdown_timeout' This was broken by bogus garbage collecting more than 5 years ago. I use the following fix, but don't use the sysctl and haven't tested if it still works with init(8): %%% Index: init_main.c =================================================================== RCS file: /home/ncvs/src/sys/kern/init_main.c,v retrieving revision 1.241 diff -u -2 -r1.241 init_main.c --- init_main.c 4 Feb 2004 21:52:55 -0000 1.241 +++ init_main.c 5 Feb 2004 10:38:55 -0000 @@ -102,4 +102,7 @@ int bootverbose; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, ""); +static int shutdowntimeout = 120; +SYSCTL_INT(_kern, OID_AUTO, shutdown_timeout, CTLFLAG_RW, + &shutdowntimeout, 0, ""); /* %%% Kernel sysctls are a wrong way to control applications, but this sysctl should have remained supported while init uses it. Bruce