Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jun 2004 12:59:12 +0300
From:      Andrey Slusar <vasallia@ukr.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68107: [MAINTAINER] comms/bforce-kst: add to nlookup supporting option -m
Message-ID:  <E1Bbccy-000A5G-SR@santinel.home.ua>
Resent-Message-ID: <200406191000.i5JA0jq6049864@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         68107
>Category:       ports
>Synopsis:       [MAINTAINER] comms/bforce-kst: add to nlookup supporting option -m
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 19 10:00:44 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Slusar
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Jun 18 00:59:25 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
	New patch files/patch-nlookup.c - supporting un-realized in original sources
	option -m - show sysop mail address
>How-To-Repeat:
	
>Fix:
	Update PORTREVISION to 2

--- bforce-kst.diff begins here ---
diff -ruN /usr/ports/comms/bforce-kst/files/patch-nlookup.c ./bforce-kst/files/patch-nlookup.c
--- /usr/ports/comms/bforce-kst/files/patch-nlookup.c	Thu Jan  1 03:00:00 1970
+++ ./bforce-kst/files/patch-nlookup.c	Sat Jun 19 07:07:51 2004
@@ -0,0 +1,48 @@
+--- bfutil/nlookup.c.orig	Thu Aug 30 16:33:51 2001
++++ bfutil/nlookup.c	Sat Jun 19 07:05:34 2004
+@@ -28,15 +28,34 @@
+ static void usage(void)
+ {
+ 	printf_usage("nodelist lookup utility",
+-		"usage: nlookup [-rh] <address>\n"
++		"usage: nlookup [-rmh] <address>\n"
+ 		"\n"
+ 		"options:\n"
+ 		"  -r                show nodelist string\n"
++		"  -m                show email address\n"
+ 		"  -h                show this help message\n"
+ 		"\n"
+ 	);
+ }
+ 
++void print_nodemail(const s_node *node)
++{
++	char abuf[BF_MAXADDRSTR+1];
++
++	if( node->sysop && *node->sysop && strcmp(node->sysop, "<none>") )
++	{
++		char username[BNI_MAXSYSOP+1];
++		
++		strnxcpy(username, node->sysop, sizeof(node->sysop));
++		string_replchar(username, ' ', '_');
++
++		printf("%s@%s.fidonet.org\n", username,
++			    ftn_addrstr_inet(abuf, node->addr));
++	}
++	
++	fflush(stdout);
++}
++
+ void print_nodeinfo(const s_node *node)
+ {
+ 	char abuf[BF_MAXADDRSTR+1];
+@@ -124,6 +143,9 @@
+ 	}
+ 	else if( nodelist_lookup(&node, addr) == 0 )
+ 	{
++	    if( emailaddr )
++		print_nodemail(&node);
++	    else
+ 		print_nodeinfo(&node);
+ 	}
+ 	
--- bforce-kst.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Bbccy-000A5G-SR>