Don't export a kern.conftxt sysctl, except when INCLUDE_CONF_FILE is

defined.  This restores the old behavior, and eliminates the
dependency on the kernconf.tmpl when INCLUDE_CONFIG_FILE isn't
included in the kernel config.  There were many people in the terminal
room that had almost, but not quite, up-to-date config files that this
helps.  I don't know if this is the result of skew among the cvsup
servers, or some other more subtle problem.  However, this fix should
work for any config of recent vintage (I tested with the latest, and
one before the recent changes, and eye-balled the intermediate
versions).

Reviewed by: the terminal room crew
This commit is contained in:
imp 2007-05-17 05:05:12 +00:00
parent 1b2d04e220
commit 52b1304476

View File

@ -300,9 +300,6 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
#ifdef INCLUDE_CONFIG_FILE
/* Actual kernel configuration options. */
extern char kernconfstring[];
#else
char kernconfstring[] = "\0";
#endif
static int
sysctl_kern_config(SYSCTL_HANDLER_ARGS)
@ -332,6 +329,7 @@ sysctl_kern_config(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW,
0, 0, sysctl_kern_config, "", "Kernel configuration file");
#endif
char domainname[MAXHOSTNAMELEN];
SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW,