From Andre.Albsmeier@mchp.siemens.de Fri Dec 13 01:26:16 1996 Received: from david.siemens.de (david.siemens.de [146.254.1.1]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id BAA04663 for ; Fri, 13 Dec 1996 01:26:14 -0800 (PST) Received: from salomon.mchp.siemens.de (salomon.mchp.siemens.de [139.23.33.13]) by david.siemens.de (8.8.3/8.8.0) with ESMTP id KAA05063 for ; Fri, 13 Dec 1996 10:22:23 +0100 (MET) Received: from curry.zfe.siemens.de (root@curry.zfe.siemens.de [146.180.31.23]) by salomon.mchp.siemens.de (8.8.2/8.8.0) with ESMTP id KAA00617 for ; Fri, 13 Dec 1996 10:26:10 +0100 (MET) Received: from server.us.tld (server.us.tld [192.168.16.33]) by curry.zfe.siemens.de (8.8.4/8.8.4) with ESMTP id KAA11489 for ; Fri, 13 Dec 1996 10:26:09 +0100 (MET) Received: (from andre@localhost) by server.us.tld (8.8.4/8.8.4) id KAA15767; Fri, 13 Dec 1996 10:26:08 +0100 (MET) Message-Id: <199612130926.KAA15767@server.us.tld> Date: Fri, 13 Dec 1996 10:26:08 +0100 (MET) From: Andre.Albsmeier@curry.zfe.siemens.de Reply-To: Andre.Albsmeier@curry.zfe.siemens.de To: FreeBSD-gnats-submit@freebsd.org Subject: NIS Makefile can't manage appletalk entries X-Send-Pr-Version: 3.2 >Number: 2206 >Category: bin >Synopsis: NIS Makefile can't manage appletalk entries >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 13 01:30:00 PST 1996 >Closed-Date: Thu Feb 12 19:39:57 PST 1998 >Last-Modified: Thu Feb 12 19:43:26 PST 1998 >Originator: Andre Albsmeier >Release: FreeBSD 2.2-RELEASE i386 >Organization: >Environment: FreeBSD-2.2, several machines >Description: When using netatalk, there are 4 lines that have to be added to /etc/services: rtmp 1/ddp # Routing Table Maintenance nbp 2/ddp # Name Binding Protocol echo 4/ddp # AppleTalk Echo Protocol zip 6/ddp # Zone Information Protocol However, when using the same machine as NIS master, building the NIS maps fails due to the fact that the Makefile knows nothing about ddp. >How-To-Repeat: Add the upper 4 lines to /etc/services (or the NIS master file) and build the NIS maps. >Fix: My quick and dirty hack is (I am no awk expert:-)): *** Makefile.dist Thu Dec 5 08:38:18 1996 --- Makefile Thu Dec 5 08:51:05 1996 *************** *** 382,388 **** $(AWK) \ '$$1 !~ "#" { for (n=1; n<=NF && $$n !~ "#"; n++) { \ if (index($$2,"udp")) { printf("%s/udp",$$n) } \ ! else { printf("%s/tcp",$$n) }; print "\t"$$0 ; \ if (n == 1) n = 2; \ } ; print $$2"\t"$$0 ; \ }' $^ | $(DBLOAD) -i $(SERVICES) -o $(YPMAPDIR)/$@ - $(TMP) --- 382,391 ---- $(AWK) \ '$$1 !~ "#" { for (n=1; n<=NF && $$n !~ "#"; n++) { \ if (index($$2,"udp")) { printf("%s/udp",$$n) } \ ! else { \ ! if (index($$2,"ddp")) { printf("%s/ddp",$$n) } \ ! else { printf("%s/tcp",$$n) }; }; \ ! print "\t"$$0 ; \ if (n == 1) n = 2; \ } ; print $$2"\t"$$0 ; \ }' $^ | $(DBLOAD) -i $(SERVICES) -o $(YPMAPDIR)/$@ - $(TMP) >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: wpaul State-Changed-When: Thu Feb 12 19:39:57 PST 1998 State-Changed-Why: i Fixed in -current and the 2.2.x branch. Rather than special-casing the extra protocol, I used the awk split() function to extract the protocol from the field no matter what it happens to be. This is a more general solution which I hope will cope with any new protocols that might turn up in /etc/services. :) -Bill >Unformatted: