Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2001 11:50:05 -0800 (PST)
From:      AMAKAWA Shuhei <sa264@cam.ac.uk>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/31208: Fix bugs in net/generic-nqs.  Now it really works!
Message-ID:  <200111151950.fAFJo5149303@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/31208; it has been noted by GNATS.

From: AMAKAWA Shuhei <sa264@cam.ac.uk>
To: Tom Hukins <tom@FreeBSD.org>
Cc: Tony Maher <tonym@biolateral.com.au>,
	freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/31208: Fix bugs in net/generic-nqs.  Now it really works!
Date: Thu, 15 Nov 2001 19:46:54 +0000

 At Thu, 15 Nov 2001 13:26:54 +0000,
 Tom Hukins wrote:
 > 
 > On Thu, Nov 15, 2001 at 08:26:26AM +1100, Tony Maher wrote:
 > > 
 > > Looks correct to me but I do not have a network to test with at the moment.
 > > interconn is required on BSD systems (see patch-aa).
 > > Actually I'd suggest that this patch-ai be modified to do error checking
 > > as in patch-aa
 > > 
 > >     if (interconn () < 0) {
 > >         fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix);
 > >         fprintf (stderr, "a pipe to the local daemon.\n");
 > >         exit (16);
 > >     }
 > > 
 > > Please commit.
 > 
 > Okay, if someone submits an updated patch to deal with the patch-aa
 > discussed above, I'll be happy to commit it.
 > 
 > Thanks,
 > Tom
 
 Here's the patch (sorry, untested).
 Thanks.
 
 diff -uNr /usr/ports/net/generic-nqs/Makefile generic-nqs/Makefile
 --- /usr/ports/net/generic-nqs/Makefile	Wed Oct 10 21:56:06 2001
 +++ generic-nqs/Makefile	Wed Oct 10 22:32:36 2001
 @@ -9,7 +9,7 @@
  
  PORTNAME=			Generic-NQS
  PORTVERSION=		3.50.9
 -PORTREVISION=		1
 +PORTREVISION=		2
  CATEGORIES=			net
  MASTER_SITES=		${MASTER_SITE_LOCAL}
  MASTER_SITE_SUBDIR=	fenner
 diff -uNr /usr/ports/net/generic-nqs/files/nqs.sh generic-nqs/files/nqs.sh
 --- /usr/ports/net/generic-nqs/files/nqs.sh	Wed Jul  5 13:36:41 2000
 +++ generic-nqs/files/nqs.sh	Wed Oct 10 22:32:37 2001
 @@ -8,7 +8,7 @@
  	fi
  	;;
  stop)
 -	killall nqsdaemon && echo -n ' nqs'
 +	killall -KILL nqsdaemon netdaemon loaddaemon && echo -n ' nqs'
  	;;
  *)
  	echo "Usage: `basename $0` {start|stop}" >&2
 diff -uNr /usr/ports/net/generic-nqs/files/patch-ah generic-nqs/files/patch-ah
 --- /usr/ports/net/generic-nqs/files/patch-ah	Thu Jan  1 01:00:00 1970
 +++ generic-nqs/files/patch-ah	Wed Oct 10 22:32:37 2001
 @@ -0,0 +1,19 @@
 +--- Source-Tree/nqsdaemon/all-systems/nqs_mai.c.orig	Sun Mar 19 13:19:21 2000
 ++++ Source-Tree/nqsdaemon/all-systems/nqs_mai.c	Sat Oct  6 10:21:00 2001
 +@@ -247,8 +247,14 @@
 + 		argv [0] = "mail";
 + 		argv [1] = maildest;
 + 		argv [2] = (char *) 0;
 +-		execve ("/bin/mail", argv,	/* Execve() mail program */
 +-			envp);
 ++		{
 ++			struct stat stb;
 ++			if (stat("/bin/mail", &stb) != -1)
 ++				execve ("/bin/mail",/* Execve() mail program */
 ++					argv, envp);
 ++			else if (stat("/usr/bin/mail", &stb) != -1)
 ++				execve ("/usr/bin/mail", argv, envp);
 ++		}
 + 		_exit (1);
 + 	}
 + 	else if (pid == -1) return (-1);	/* Fork failed */
 diff -uNr /usr/ports/net/generic-nqs/files/patch-ai generic-nqs/files/patch-ai
 --- /usr/ports/net/generic-nqs/files/patch-ai	Thu Jan  1 01:00:00 1970
 +++ generic-nqs/files/patch-ai	Thu Nov 15 14:17:46 2001
 @@ -0,0 +1,17 @@
 +--- Source-Tree/pipeclient/all-systems/pipeclient.c.orig	Sun Mar 19 13:19:42 2000
 ++++ Source-Tree/pipeclient/all-systems/pipeclient.c	Thu Nov 15 14:17:26 2001
 +@@ -1059,7 +1059,14 @@
 + 	signal(SIGPIPE, catch_sigpipe);
 + 
 + 	do {
 ++#if HAS_BSD_PIPE
 ++		if (interconn () < 0) {
 ++			sal_dprintf(SAL_DEBUG_INFO, SAL_DEBUG_MSG_WARNING, "pipeclient: Unable to get a pipe to the local daemon.\n");
 ++			ourserexit (RCM_UNAFAILURE, (char *) 0);
 ++		}
 ++#else
 + 		interset(-1);
 ++#endif
 + 		interclear ();
 + 		interw32i (rawreq->orig_seqno);
 + 		interw32u (rawreq->orig_mid);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111151950.fAFJo5149303>