ports/107894: security/sguil-sensor, correct init script error

Paul Schmehl pauls at utdallas.edu
Sun Jan 14 01:10:16 UTC 2007


>Number:         107894
>Category:       ports
>Synopsis:       security/sguil-sensor, correct init script error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 14 01:10:16 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Paul Schmehl
>Release:        FreeBSD 6.0-RELEASE-p15 amd64
>Organization:
The University of Texas at Dallas
>Environment:
System: FreeBSD hostname.utdallas.edu 6.0-RELEASE-p15 FreeBSD 6.0-RELEASE-p15 #2: Mon Oct 16 21:28:21 UTC 2006 root at hostname.utdallas.edu:/usr/obj/usr/src/sys/SMPKERNEL amd64


	
>Description:
	The init script will not start the daemon if the security/sguil-server
	port is installed on the same server and is already running.  Although
	this is not the recommended procedure for running sguil, some are running
	it that way.  This patch corrects the problem in conjunction with a patch
	being submitted at the same time for security/sguil-server.
>How-To-Repeat:
	
>Fix:

	

--- patch-sensor_agent.sh.in begins here ---
--- sensor_agent.sh.in.orig	Sun Jan 14 00:27:19 2007
+++ sensor_agent.sh.in	Sun Jan 14 00:32:08 2007
@@ -20,27 +20,14 @@
 rcvar=`set_rcvar`
 command="%%PREFIX%%/bin/%%SGUILDIR%%/sensor_agent.tcl"
 procname="%%PREFIX%%/bin/tclsh8.4"
-check_process="${command} /bin/sh"
-stop_cmd="sensor_agent_stop"
+pidfile="/var/run/${name}.pid"
+check_pidfile="${pidfile} ${procname} /bin/sh"
 
 [ -z "$sensor_agent_enable" ]    && sensor_agent_enable="NO"
 [ -z "$sensor_agent_conf" ]      && sensor_agent_conf="%%PREFIX%%/etc/sensor_agent.conf"
 [ -z "$sensor_agent_flags" ]     && sensor_agent_flags="-D"
 
 [ -n "$sensor_agent_conf" ]      && sensor_agent_flags="$sensor_agent_flags -c $sensor_agent_conf"
-
-sensor_agent_stop() {
-  if [ -z "${rc_pid}" ]; then
-    echo "${name} not running?"
-  else
-    echo "Stopping ${name}"
-    kill ${sig_stop} ${rc_pid}
-    wait_for_pids ${rc_pid}
-    if [ -f "/var/run/${name}.pid" ]; then
-      `rm -f /var/run/${name}.pid`
-    fi
-  fi
-}
 
 load_rc_config $name
 run_rc_command "$1"
--- patch-sensor_agent.sh.in ends here ---


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



More information about the freebsd-ports-bugs mailing list