Help with RC script

Gaurav Agarwal gagarwal at innoviti.com
Thu Nov 1 06:11:49 PDT 2007


Dear All,

 

I have kept the following test script in /usr/local/etc/rc.d 

 

#!/bin/sh

 

#

# PROVIDE: test

# REQUIRE: DAEMON

 

#

# DO NOT CHANGE THESE DEFAULT VALUES HERE

# SET THEM IN THE /etc/rc.conf FILE

#

 

. /etc/rc.subr

 

name="test"

rcvar= "set_rcvar"

 

: ${test_enable:="NO"}

 

command="nohup /usr/local/test/test.sh > /usr/local/test/log/log.txt &"

 

load_rc_config $name

run_rc_command "$1"

 

I have put the line test_enable="YES" in /etc/rc.conf.

 

The script works properly when I run from the prompt but when I restarted
and restarted the system many times without the script running directly from
it. All i can see in the log file is this

 

/etc/rc: INFO: run_rc_command: _doit: nohup /usr/local/test/bin/q2 >
/usr/local/test/log/log.txt &

 

Please let me know how I can rectify this issue?

 

Thanks and Regards,

Gaurav Agarwal



More information about the freebsd-rc mailing list