Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2008 21:57:06 +0200
From:      "Martin Tournoij" <carpetsmoker@rwxrwxrwx.net>
To:        freebsd-ports@freebsd.org
Cc:        pauls@utdallas.edu
Subject:   Re: rc.d startup script problem
Message-ID:  <20080513195706.GA9974@rwxrwxrwx.net>
In-Reply-To: <14848575EFE82AE05B2027F2@utd65257.utdallas.edu>
References:  <14848575EFE82AE05B2027F2@utd65257.utdallas.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 13, 2008 at 02:35:54PM -0500, Paul Schmehl wrote:
> This script will not start if you change the name or location of the conf 
> file in /etc/rc.conf.  For some reason it's not parsing /etc/rc.conf.  
> Anyone know why?
> 
> #!/bin/sh
> 
> # PROVIDE: sancp_agent
> # REQUIRE: DAEMON
> # KEYWORD: shutdown
> 
> # Add the following line to /etc/sguil-sensor/rc.conf to enable sancp_agent:
> # sancp_agent_enable (bool):    Set to YES to enable sancp_agent
> #                               Default: NO
> # sancp_agent_conf (str):       Sensor_agent configuration file
> #                               Default: 
> /usr/local/etc/sguil-sensor/sancp_agent.conf
> #
> 
> . /etc/rc.subr
> 
> name="sancp_agent"
> rcvar=`set_rcvar`
> command="/usr/local/bin/sguil-sensor/sancp_agent.tcl"
> procname="/usr/local/bin/tclsh8.4"
> pidfile="/var/run/${name}.pid"
> check_pidfile="${pidfile} ${procname} /bin/sh"
> 
> [ -z "$sancp_agent_enable" ]    && sancp_agent_enable="NO"
> [ -z "$sancp_agent_conf" ]      && 
> sancp_agent_conf="/usr/local/etc/sguil-sensor/sancp_agent.conf"
> [ -z "$sancp_agent_flags" ]     && sancp_agent_flags="-D"
> 
> [ -n "$sancp_agent_conf" ]      && sancp_agent_flags="$sancp_agent_flags -c 
> $sancp_agent_conf"
> 
> load_rc_config $name
> run_rc_command "$1"
> 
> # grep sancp /etc/rc.conf
> sancp_agent_enable="YES"
> sancp_agent_conf="/usr/local/etc/sguil-sensor/sancp_agent-ANYSERVER.conf"
> 
> What's the problem?
> 

You can try setting 'rc_debug="YES"' in /etc/rc.conf and see if the
additional messages provide a clue...

-- 
Martin Tournoij
carpetsmoker@rwxrwxrwx.net
http://www.daemonforums.org

	"Mind if I smoke?" "Yes, I'd like to see that, does it
	come out of your ears or what?"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080513195706.GA9974>