diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2004-11-13 20:40:32 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2004-11-13 20:40:32 +0000 |
| commit | 6c58990d4782600a6f5fc5ce9fc0ef48bd9cc001 (patch) | |
| tree | da33d2aed5fb6a0c2319fb0d10f0957f518eee99 /usr.sbin/bootparamd | |
| parent | 70502bea852fbe21d2d1edc4a67e976adf7f96dd (diff) | |
Notes
Diffstat (limited to 'usr.sbin/bootparamd')
| -rw-r--r-- | usr.sbin/bootparamd/bootparamd/Makefile | 3 | ||||
| -rw-r--r-- | usr.sbin/bootparamd/bootparamd/bootparamd.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile index 11c639048a12..af8a0dcffdc7 100644 --- a/usr.sbin/bootparamd/bootparamd/Makefile +++ b/usr.sbin/bootparamd/bootparamd/Makefile @@ -7,6 +7,9 @@ SRCS= bootparamd.c main.c ${GENSRCS} GENSRCS=bootparam_prot.h bootparam_prot_svc.c bootparam_prot_xdr.c CFLAGS+= -DTFTP_DIR=\"/tftpboot\" -I. +.if !defined(NO_NIS) +CFLAGS+= -DYP +.endif CLEANFILES= ${GENSRCS} diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 159124e008ad..238686bcdc1d 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -12,9 +12,11 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#ifdef YP #include <rpc/rpc.h> #include <rpcsvc/yp_prot.h> #include <rpcsvc/ypclnt.h> +#endif #include "bootparam_prot.h" #include <ctype.h> #include <err.h> @@ -191,7 +193,9 @@ int blen; char *where; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif int ch, pch, fid_len, res = 0; int match = 0; @@ -212,6 +216,7 @@ int blen; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -230,6 +235,9 @@ int blen; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(1); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ if ( match ) break; @@ -288,7 +296,9 @@ int len; int res = 0; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif /* struct hostent *cmp_he;*/ @@ -315,6 +325,7 @@ int len; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -332,6 +343,9 @@ int len; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(res); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ pch = ch = getc(bpf); |
