MFC the HOSTRES-MIB. This is exactly the same version as in HEAD except for

a slightly different mechanism to load geom_md (g_me) which was renamed at
some point. This has been tested on RELENG_6 by erwin and glebius.

Reviewed by:	erwin, glebius
This commit is contained in:
harti 2006-01-27 16:27:34 +00:00
parent f63159780d
commit aab4200093
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ _snmp_atm= snmp_atm
.endif
SUBDIR= ${_snmp_atm} \
snmp_hostres \
snmp_mibII \
snmp_netgraph \
snmp_pf

View File

@ -133,9 +133,10 @@ mdmaybeload(void)
snprintf(name2, sizeof(name2), "geom_%s", MD_NAME);
if (modfind(name1) == -1) {
/* Not present in kernel, try loading it. */
if (kldload(name2) == -1 || modfind(name1) == -1) {
if ((kldload(name2) == -1 || modfind(name1) == -1) &&
(kldload(name1) == -1 || modfind(name1) == -1)) {
if (errno != EEXIST) {
errx(EXIT_FAILURE,
syslog(LOG_WARNING,
"%s module not available!", name2);
}
}