Date: Sun, 4 Mar 2007 18:49:58 +0900 (YAKT) From: Alexander Logvinov <ports@logvinov.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Alexander Logvinov <ports@logvinov.com> Subject: ports/109846: [maintainer update] comms/atslog: update to 2.1.1 Message-ID: <200703040949.l249nwcO028003@blg.akavia.ru> Resent-Message-ID: <200703041000.l24A0BT3033417@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 109846 >Category: ports >Synopsis: [maintainer update] comms/atslog: update to 2.1.1 >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: Sun Mar 04 10:00:10 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alexander Logvinov >Release: FreeBSD 6.2-RELEASE-p2 i386 >Organization: >Environment: >Description: Update to 2.1.1 release >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/comms/atslog/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- Makefile 14 Feb 2007 11:00:13 -0000 1.8 +++ Makefile 4 Mar 2007 09:47:06 -0000 @@ -6,8 +6,7 @@ # PORTNAME= atslog -PORTVERSION= 2.1.0 -PORTREVISION= 1 +PORTVERSION= 2.1.1 CATEGORIES= comms MASTER_SITES= BERLIOS @@ -92,7 +91,7 @@ .for i in ${CONFIGS} ${INSTALL_DATA} ${WRKSRC}/include/${i} ${PREFIX}/etc/ .endfor -.for i in atslogcleardb.pl atslogdaily atslogdb.pl atslogmaster atslogrotate +.for i in atslogcleardb.pl atslogdb.pl atslogmaster ${INSTALL_SCRIPT} ${WRKSRC}/include/${i} ${PREFIX}/bin .endfor ${MKDIR} ${DATADIR}/lang Index: distinfo =================================================================== RCS file: /home/pcvs/ports/comms/atslog/distinfo,v retrieving revision 1.3 diff -u -r1.3 distinfo --- distinfo 28 Jan 2007 10:42:01 -0000 1.3 +++ distinfo 4 Mar 2007 09:47:06 -0000 @@ -1,3 +1,3 @@ -MD5 (atslog-2.1.0.tar.gz) = 42fc0fe0f7128f68067ed4a5f5420ab6 -SHA256 (atslog-2.1.0.tar.gz) = 6161ca706a0d5983b4fe557c9b28690f011d8f0506af4693921bc05dacf1dfd7 -SIZE (atslog-2.1.0.tar.gz) = 589123 +MD5 (atslog-2.1.1.tar.gz) = 383e8d5c46bdb14dc4c7fd11f33fc457 +SHA256 (atslog-2.1.1.tar.gz) = dd184aeac7665b37d23f09a56ed91492af599f239e2e184eecf27aed45b43315 +SIZE (atslog-2.1.1.tar.gz) = 595393 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/comms/atslog/pkg-plist,v retrieving revision 1.4 diff -u -r1.4 pkg-plist --- pkg-plist 28 Jan 2007 10:42:01 -0000 1.4 +++ pkg-plist 4 Mar 2007 09:47:06 -0000 @@ -2,14 +2,13 @@ %%WWW%%@unexec if cmp -s %D/www/atslog/include/config.inc.php %D/www/atslog/include/config.inc.php.default; then rm -f %D/www/atslog/include/config.inc.php; fi bin/atslogcleardb.pl bin/atslogd -bin/atslogdaily bin/atslogdb.pl bin/atslogmaster -bin/atslogrotate etc/atslog.conf.default @exec [ -f %B/atslog.conf ] || cp %B/%f %B/atslog.conf etc/atslog.conf.default.rus libexec/atslog/4200e.lib +libexec/atslog/bp-250.lib libexec/atslog/gd-320.lib libexec/atslog/gdk-100.lib libexec/atslog/genindex.sh @@ -61,6 +60,7 @@ %%EXAMPLESDIR%%/textlogs/Multicom MAXICOM MP80.TXT %%EXAMPLESDIR%%/textlogs/Multicom Maxicom MXM300.txt %%EXAMPLESDIR%%/textlogs/NEC NEAX2000 IPS.txt +%%EXAMPLESDIR%%/textlogs/NEC NEAX7400 ICS m100.txt %%EXAMPLESDIR%%/textlogs/Panasonic 816.txt %%EXAMPLESDIR%%/textlogs/Panasonic DBS-90.txt %%EXAMPLESDIR%%/textlogs/Panasonic KX-T1232-RU.txt @@ -83,6 +83,7 @@ %%EXAMPLESDIR%%/textlogs/Panasonic KX-TDA100 A.txt %%EXAMPLESDIR%%/textlogs/Panasonic KX-TDA100 B.txt %%EXAMPLESDIR%%/textlogs/Panasonic KX-TDA100 C.txt +%%EXAMPLESDIR%%/textlogs/Panasonic KX-TDA600.txt %%EXAMPLESDIR%%/textlogs/Panasonic KX-TEM824.txt %%EXAMPLESDIR%%/textlogs/Samsung DCS Compact II.txt %%EXAMPLESDIR%%/textlogs/Samsung DCS.txt Index: files/patch-atslogd.c =================================================================== RCS file: files/patch-atslogd.c diff -N files/patch-atslogd.c --- files/patch-atslogd.c 14 Feb 2007 11:00:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,109 +0,0 @@ ---- atslogd/atslogd.c.orig Sun Jan 28 17:52:03 2007 -+++ atslogd/atslogd.c Wed Feb 14 16:22:23 2007 -@@ -143,16 +143,54 @@ - close(hCom); - } - --static int --daemonize(void) --{ -- int rc; -- rc = fork(); -- if (rc == (-1)) -- return (-1); -- if (rc != 0) -- _exit(EX_OK); -- return rc; -+/* taken from the http://www.developerweb.net/forum/archive/index.php/t-3025.html */ -+void daemonize(void) { -+ int fd; -+ switch (fork()) { -+ case 0: -+ break; -+ case -1: -+ // Error -+ fprintf(stderr, "Error demonizing (fork)! %d - %s\n", errno, strerror(errno)); -+ exit(0); -+ break; -+ default: -+ _exit(0); -+ } -+ -+ if (setsid() < 0) { -+ fprintf(stderr, "Error demonizing (setsid)! %d - %s\n", errno, strerror(errno)); -+ exit(0); -+ } -+ switch (fork()) { -+ case 0: -+ break; -+ case -1: -+ // Error -+ fprintf(stderr, "Error demonizing (fork2)! %d - %s\n", errno, strerror(errno)); -+ exit(0); -+ break; -+ default: -+ _exit(0); -+ } -+ /* Are we really need this? */ -+ // chdir("/"); -+ -+ fd = open("/dev/null", O_RDONLY); -+ if (fd != 0) { -+ dup2(fd, 0); -+ close(fd); -+ } -+ fd = open("/dev/null", O_WRONLY); -+ if (fd != 1) { -+ dup2(fd, 1); -+ close(fd); -+ } -+ fd = open("/dev/null", O_WRONLY); -+ if (fd != 2) { -+ dup2(fd, 2); -+ close(fd); -+ } - } - - FILE * -@@ -755,6 +793,9 @@ - argc -= optind; - argv += optind; - -+ if (do_daemonize) -+ daemonize(); -+ - if (logfile) { - errout = fopen(logfile, "at"); - if (errout == NULL) { -@@ -772,28 +813,22 @@ - } - my_syslog("Starting"); - -- if (do_daemonize) -- daemonize(); - - pid = getpid(); -- - if (do_daemonize && pid == (-1)) { - my_syslog("Can't become daemon, exiting"); - my_exit(1); -- } -+ } - pfd = open_pid(); - if (pfd != NULL) { -- (void)fprintf(pfd, "%ld\n", (long)pid); -+ (void)fprintf(pfd, "%d\n", getpid()); - fclose(pfd); - } else { - my_syslog("Can't write to '%s' PID file, exiting", pid_file); - my_exit(1); - } - -- if (do_daemonize) -- pid = daemonize(); -- else -- pid = getpid(); -+ pid = getpid(); - - if (do_daemonize && pid == (-1)) { - my_syslog("Can't become daemon, exiting"); Index: files/patch-atslogmaster.in =================================================================== RCS file: files/patch-atslogmaster.in diff -N files/patch-atslogmaster.in --- files/patch-atslogmaster.in 14 Feb 2007 11:00:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,54 +0,0 @@ ---- include/atslogmaster.in Sun Jan 28 17:52:01 2007 -+++ include/atslogmaster.in Wed Feb 14 16:16:05 2007 -@@ -6,6 +6,7 @@ - NOWDATE=`LANG=en_US;date` - BASENAME=`basename $0` - prefix=@prefix@ -+ATSLOGDpid="" - - # Readin config file - if [ -r @sysconfdir@/atslog.conf ]; then -@@ -26,10 +27,11 @@ - fi - - checkstatus(){ -+ ATSLOGDpid="" - if [ -f $pidfile ] ; then - PID=`cat $pidfile` - if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then -- return $PID -+ ATSLOGDpid=$PID - fi - fi - return 0 -@@ -39,10 +41,6 @@ - PATH=$PATH:$bindir:$sharedir - - checkstatus --ATSLOGDpid=$? --if [ $ATSLOGDpid -eq 0 ]; then -- ATSLOGDpid="" --fi - - case "$debug" in - [Yy][Ee][Ss]) -@@ -98,10 +96,6 @@ - echo "$msg8" - fi - checkstatus -- ATSLOGDpid=$? -- if [ $ATSLOGDpid -eq 0 ]; then -- ATSLOGDpid="" -- fi - startloging - if [ $? -eq 0 ] - then -@@ -159,7 +153,7 @@ - fi - sleep 1; - checkstatus -- if [ $? -eq 0 ];then -+ if [ -z ATSLOGDpid ];then - TORETURN=1; # atslogd not started - ERRORMESSAGE=$msg4 - echomess >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703040949.l249nwcO028003>