diff options
author | wpaul <wpaul@FreeBSD.org> | 1996-06-25 20:28:07 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1996-06-25 20:28:07 +0000 |
commit | 010c2800ac465122fd044b00182f58244ecaa396 (patch) | |
tree | 00db076867717b30e2de7f4459457e04d764e7d3 /usr.sbin/ypserv | |
parent | ab0aedf77d5aa3efcf91b13779ffadf455caeeb9 (diff) | |
download | FreeBSD-src-010c2800ac465122fd044b00182f58244ecaa396.zip FreeBSD-src-010c2800ac465122fd044b00182f58244ecaa396.tar.gz |
Toss old mknetid script into the attic.
Adjust things slightly to support the new mknetid program.
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/Makefile | 5 | ||||
-rw-r--r-- | usr.sbin/ypserv/Makefile.yp | 7 | ||||
-rwxr-xr-x | usr.sbin/ypserv/mknetid | 36 |
3 files changed, 5 insertions, 43 deletions
diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index 340a4cc..4b2520b 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.3 1995/12/23 21:35:27 wpaul Exp $ +# $Id: Makefile,v 1.4 1996/04/28 04:38:45 wpaul Exp $ PROG= ypserv SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \ @@ -36,9 +36,6 @@ afterinstall: ln -s ${DESTDIR}/var/yp/Makefile.dist \ ${DESTDIR}/var/yp/Makefile; fi ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${.CURDIR}/mknetid \ - ${DESTDIR}/usr/libexec/mknetid - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${.CURDIR}/mkaliases \ ${DESTDIR}/usr/libexec/mkaliases diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp index b8f474c..8152c76 100644 --- a/usr.sbin/ypserv/Makefile.yp +++ b/usr.sbin/ypserv/Makefile.yp @@ -1,7 +1,7 @@ # # Makefile for the NIS databases # -# $Id: Makefile.yp,v 1.5 1996/06/03 16:24:32 wpaul Exp $ +# $Id: Makefile.yp,v 1.6 1996/06/05 02:01:27 wpaul Exp $ # # This Makefile should only be run on the NIS master server of a domain. # All updated maps will be pushed to all NIS slave servers listed in the @@ -102,6 +102,7 @@ MASTER = $(MASTER_PASSWD) .endif YPSERVERS = $(YPDIR)/ypservers # List of all NIS servers for a domain PUBLICKEY = $(YPSRCDIR)/publickey +NETID = $(YPSRCDIR)/netid target: @$(RM) $(NFILE) @@ -457,8 +458,8 @@ group.bygid: $(GROUP) netid.byname: $(GROUP) $(PASSWD) @echo "Updating $@..." @echo $@.$$$$ > $(NFILE) - @$(MKNETID) $(PASSWD) $(GROUP) `basename \`pwd\`` \ - | $(DBLOAD) -o $(YPMAPDIR)/$@ - $(TMP) + @$(MKNETID) -q -p $(PASSWD) -g $(GROUP) -h $(HOSTS) -n $(NETID) \ + -d $(DOMAIN) | $(DBLOAD) -o $(YPMAPDIR)/$@ - $(TMP) @$(MV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi diff --git a/usr.sbin/ypserv/mknetid b/usr.sbin/ypserv/mknetid deleted file mode 100755 index 6619b5d..0000000 --- a/usr.sbin/ypserv/mknetid +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# Produce netid.byname map file -# -# Written by O.Kirch, 1994. -# -PASSWD=$1 -GROUP=$2 -DOMAIN=$3 - -tempsed=/tmp/pass.$$ - - # First, get all login/uid info from passwd file - grep -v '^+:' $PASSWD | - awk -F: '{ printf "s/^%s:/%s/\n", $1, $3; }' >$tempsed - # next one is a giant pipe: - grep -v '^+:' $GROUP | - grep -v ':[ ]*$' | - sed 's/^[^:]*:[^:]*:\([0-9]*\):\(.*\)/\1,\2/' | - awk -F, '{ for (n=2; n<=NF; n++) - if ($n != "") print $n":\t"$1; - }' | - sed -f $tempsed | sort | grep -v ':' | - awk 'BEGIN { uid=-1; } - { if (uid == $1) { - groups=groups","$2; - } else { - if (uid != -1) - print uid":"groups; - uid=$1; groups=$2; - } - } - END { if (uid != -1) printf("%s:%s\n", uid, groups); }' | - sed "s/\(.*\):/unix.\1@$DOMAIN &/" - rm -f $tempsed - exit 0 |