ports/129571: update port security/termlog - add starup scripts

Alex Keda admin at lissyara.su
Thu Dec 11 12:30:01 UTC 2008


>Number:         129571
>Category:       ports
>Synopsis:       update port security/termlog - add starup scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 11 12:30:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alex Keda
>Release:        7.1
>Organization:
ussr
>Environment:
srv2# uname -a
FreeBSD srv2.host-food.ru 7.1-RC1 FreeBSD 7.1-RC1 #0: Tue Dec  9 00:39:57 MSK 2008     serge at xeon-2x2000.lissyara.su:/usr/obj/usr/src/sys/HOST-FOOD  i386

>Description:
port security/termlog do not have startup script.
this patch add them
http://lissyara.su/patch/termlog.diff
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -Nru termlog.orig/Makefile termlog/Makefile
--- termlog.orig/Makefile	2005-10-12 07:37:55.000000000 +0400
+++ termlog/Makefile	2008-12-11 15:16:35.000000000 +0300
@@ -7,6 +7,7 @@
 
 PORTNAME=	termlog
 PORTVERSION=	2.5
+PORTREVISION=	1
 CATEGORIES=	security sysutils
 MASTER_SITES=	http://www.seccuris.com/documents/downloads/
 MASTER_SITE_SUBDIR=	termlog
@@ -15,6 +16,7 @@
 COMMENT=	Monitor or log multiple system terminals synchronously
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_RC_SUBR=	${PORTNAME}
 
 MAN1=		termlog.1
 PLIST_FILES=	bin/termlog
diff -Nru termlog.orig/files/termlog.in termlog/files/termlog.in
--- termlog.orig/files/termlog.in	1970-01-01 03:00:00.000000000 +0300
+++ termlog/files/termlog.in	2008-12-11 15:11:32.000000000 +0300
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# PROVIDE: termlog
+# REQUIRE: cron devfs syslogd
+
+. /etc/rc.subr
+
+load_rc_config termlog
+
+name=termlog
+rcvar=`set_rcvar`
+
+command="/usr/local/bin/termlog"
+
+# default to disable
+termlog_enable=${termlog_enable:-"NO"}
+# logging path
+termlog_log_dir=${termlog_log_dir:-"/var/log/termlog/"}
+# maximum monitored consoles
+termlog_max_cons=${termlog_max_cons:-"30"}
+termlog_flags=${termlog_flags:-" -C $termlog_log_dir -f -n $termlog_max_cons &"}
+
+start_precmd=start_precmd
+
+start_precmd()
+{
+	mkdir -p $termlog_log_dir
+	chmod 751 $termlog_log_dir
+}
+
+
+run_rc_command "$1"
+


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list