From owner-freebsd-ports Thu Nov 15 11:51:31 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AFD1A37B421 for ; Thu, 15 Nov 2001 11:50:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAFJo5149303; Thu, 15 Nov 2001 11:50:05 -0800 (PST) (envelope-from gnats) Date: Thu, 15 Nov 2001 11:50:05 -0800 (PST) Message-Id: <200111151950.fAFJo5149303@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: AMAKAWA Shuhei Subject: Re: ports/31208: Fix bugs in net/generic-nqs. Now it really works! Reply-To: AMAKAWA Shuhei Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/31208; it has been noted by GNATS. From: AMAKAWA Shuhei To: Tom Hukins Cc: Tony Maher , 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