Make Generic-NQS actually work properly

PR:		ports/31208
Submitted by:	AMAKAWA Shuhei <sa264@cam.ac.uk>
This commit is contained in:
Tom Hukins 2001-11-17 16:06:51 +00:00
parent 0828951b17
commit d49d576fe5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=50147
5 changed files with 38 additions and 2 deletions

View file

@ -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

View file

@ -8,7 +8,7 @@ start)
fi
;;
stop)
killall nqsdaemon && echo -n ' nqs'
killall -KILL nqsdaemon netdaemon loaddaemon && echo -n ' nqs'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2

View file

@ -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 */

View file

@ -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);