Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/ypserv/ypinit Pull up revision 1.14 (requested...
details: https://anonhg.NetBSD.org/src/rev/f3070b8cf045
branches: netbsd-1-4
changeset: 471259:f3070b8cf045
user: he <he%NetBSD.org@localhost>
date: Tue Jan 30 10:15:44 2001 +0000
description:
Pull up revision 1.14 (requested by sr):
Handle multi-line netgroup entries correctly.
diffstat:
usr.sbin/ypserv/ypinit/Makefile.yp | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r c1f314079f3f -r f3070b8cf045 usr.sbin/ypserv/ypinit/Makefile.yp
--- a/usr.sbin/ypserv/ypinit/Makefile.yp Tue Jan 30 10:06:07 2001 +0000
+++ b/usr.sbin/ypserv/ypinit/Makefile.yp Tue Jan 30 10:15:44 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.yp,v 1.8.2.1 1999/11/20 17:39:10 he Exp $
+# $NetBSD: Makefile.yp,v 1.8.2.2 2001/01/30 10:15:44 he Exp $
#
# This is the YP Makefile, used to create and push YP maps.
#
@@ -215,7 +215,21 @@
netgroup.time: ${DIR}/netgroup
-@if [ -f ${.ALLSRC} ]; then \
- ${CAT} ${.ALLSRC} | ${SORT} | ${MAKEDBM} - netgroup; \
+ ${SED} -e "s/#.*$$//" -e "/^$$/d" ${.ALLSRC} | \
+ ${AWK} '{ \
+ for (i = 1; i <= NF; i++) \
+ if (i == NF) { \
+ if (substr($$i, length($$i), 1) == "\\") { \
+ printf("%s", \
+ substr($$i, 1, length($$i) - 1)); \
+ } \
+ else \
+ printf("%s\n", $$i); \
+ } \
+ else \
+ printf("%s ", $$i); \
+ }' | \
+ ${SORT} | ${MAKEDBM} - netgroup; \
${CAT} ${.ALLSRC} | ${REVNETGROUP} -u -f - | \
${SORT} | ${MAKEDBM} - netgroup.byuser; \
${CAT} ${.ALLSRC} | ${REVNETGROUP} -h -f - | \
Home |
Main Index |
Thread Index |
Old Index