kern.shutdown_timeout sysctl not working
Bruce Evans
bde at zeta.org.au
Wed Feb 25 06:13:44 PST 2004
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
More information about the freebsd-current
mailing list