aboutsummaryrefslogtreecommitdiffstats
path: root/mail/youbin
diff options
context:
space:
mode:
authormax <max@FreeBSD.org>1996-10-09 20:50:55 +0800
committermax <max@FreeBSD.org>1996-10-09 20:50:55 +0800
commit513947d69f690f1b0d87b9a9a5440b7337ba52bd (patch)
treedcf401ec39183b5596d3cb33f33075ff18e90f7e /mail/youbin
parentdcce4e46220a9021e5d46b599e04db7d2ca6ad9a (diff)
downloadfreebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.tar.gz
freebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.tar.zst
freebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.zip
Added local hack to make youbind server detatch itself from the controling
tty at the startup. Removed `&' from the startup script since youbind doesn't need to be put background manually.
Diffstat (limited to 'mail/youbin')
-rw-r--r--mail/youbin/Makefile24
-rw-r--r--mail/youbin/files/patch-ae39
2 files changed, 46 insertions, 17 deletions
diff --git a/mail/youbin/Makefile b/mail/youbin/Makefile
index 85da55cba1df..beedd506fd51 100644
--- a/mail/youbin/Makefile
+++ b/mail/youbin/Makefile
@@ -3,7 +3,7 @@
# Date created: 09 Aug 1996
# Whom: Masafumi NAKANE <max@FreeBSD.ORG>
#
-# $Id: Makefile,v 1.4 1996/09/17 15:07:58 max Exp $
+# $Id: Makefile,v 1.5 1996/09/18 19:20:24 max Exp $
#
DISTNAME= youbin-2.13
@@ -21,19 +21,19 @@ PREFIX?= ${LOCALBASE}
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/youbind.sh
post-install:
- @if [ ! -f ${STARTUP_SCRIPT} ]; then \
- echo "Creating startup script '${STARTUP_SCRIPT}'" ;\
- echo "#!/bin/sh" > ${STARTUP_SCRIPT} ;\
- echo "if [ -f ${PREFIX}/sbin/youbind ]; then" >> \
- ${STARTUP_SCRIPT} ;\
- echo " ${PREFIX}/sbin/youbind &" >> ${STARTUP_SCRIPT} ;\
- echo " echo -n ' youbind'" >> ${STARTUP_SCRIPT} ;\
- echo "fi" >> ${STARTUP_SCRIPT} ;\
- chmod 755 ${STARTUP_SCRIPT} ;\
+ @if [ ! -f ${STARTUP_SCRIPT} ]; then \
+ echo "Creating startup script '${STARTUP_SCRIPT}'" ; \
+ echo "#!/bin/sh" > ${STARTUP_SCRIPT} ; \
+ echo "if [ -f ${PREFIX}/sbin/youbind ]; then" \
+ >> ${STARTUP_SCRIPT} ; \
+ echo " ${PREFIX}/sbin/youbind ; echo -n ' youbind'" \
+ >> ${STARTUP_SCRIPT} ; \
+ echo "fi" >> ${STARTUP_SCRIPT} ; \
+ chmod 755 ${STARTUP_SCRIPT} ; \
fi
- @-(grep -v ^# /etc/inetd.conf | grep comsat > /dev/null) && \
+ @-(grep -v ^# /etc/inetd.conf | grep comsat > /dev/null) && \
(echo "Now you need to edit /etc/inetd.conf and comment out the" ;\
- echo "entry for comsat. Then, do:" ;\
+ echo "entry for comsat. Then, do:" ; \
echo "kill -HUP `cat /var/run/inetd.pid`")
.include <bsd.port.mk>
diff --git a/mail/youbin/files/patch-ae b/mail/youbin/files/patch-ae
index 2c2edeceeb1f..8e1fe6171e66 100644
--- a/mail/youbin/files/patch-ae
+++ b/mail/youbin/files/patch-ae
@@ -1,6 +1,35 @@
-diff -c server.c.orig server.c
*** server.c.orig Sun Mar 26 20:33:31 1995
---- server.c Wed Aug 7 13:47:05 1996
+--- server.c Wed Oct 9 21:29:25 1996
+***************
+*** 48,53 ****
+--- 48,56 ----
+ #include <pwd.h> /* For getpwuid(). */
+ #include <signal.h>
+ #include <stdio.h>
++ #ifdef __FreeBSD__
++ #include <stdlib.h>
++ #endif
+
+ #include "youbin.h"
+ #include "server.h"
+***************
+*** 154,159 ****
+--- 157,171 ----
+ dummy.tv_sec = (long)(UNIT_TIME * 10);
+ dummy.tv_usec = 0L;
+
++ /*Go to background. This part was modified locally by Masafumi NAKANE
++ <max@wide.ad.jp>, and is used only on FreeBSD./*
++ #ifdef __FreeBSD__
++ if (daemon(1, 1) == -1) {
++ perror("daemon");
++ kill(getpid(), SIGTERM);
++ }
++ #endif
++
+ /* Dive into main loop. Don't use setjmp() and longjmp(),
+ because list maintenance routines are in critical section. */
+ alarm(UNIT_TIME);
***************
*** 244,250 ****
char buff[MESS_LEN + 1];
@@ -10,7 +39,7 @@ diff -c server.c.orig server.c
if (errno != EINTR) {
warn_log("Error in receiving packet\n");
}
---- 244,250 ----
+--- 256,262 ----
char buff[MESS_LEN + 1];
int len, flen = sizeof(ca);
@@ -27,7 +56,7 @@ diff -c server.c.orig server.c
sys_error_log("bind");
exit(EXIT_FAILURE);
}
---- 543,549 ----
+--- 555,561 ----
saddr->sin_family = hp->h_addrtype;
saddr->sin_addr.s_addr = htonl(INADDR_ANY);
saddr->sin_port = sp->s_port;
@@ -44,7 +73,7 @@ diff -c server.c.orig server.c
warn_log("Error in sending packet: %s\n", mess);
}
}
---- 586,592 ----
+--- 598,604 ----
debug_log("Send: %s [%ld]: \"%.*s\"\n",
((sp == CA_ADDR) ? "" : sp->parent->name), (long)sp,
MAX_DEBUG_COLUMN, mess);