Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2004 01:13:33 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dominic Bishop <dom@bishnet.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kern.shutdown_timeout sysctl not working
Message-ID:  <20040226010010.N12139@gamplex.bde.org>
In-Reply-To: <20040225124546.AFBF043D39@mx1.FreeBSD.org>
References:  <20040225124546.AFBF043D39@mx1.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040226010010.N12139>