hello!
i've tried to create my own statup script, but it doesn't work at startup. it works when run from within /usr/local/etc/rc.d/ directory manually, but not at startup.
i was trying to follow this guide:
http://www.freebsd.org/doc/en_US.ISO...ing/index.html
Here is the script:
Code:
80# cat /usr/local/etc/rc.d/test
#!/bin/sh
. /etc/rc.subr
name="test"
rcvar=`set_rcvar`
start_cmd="${name}_start"
stop_cmd=":"
test_start()
{
/usr/bin/touch /var/log/`date "+%H-%M-%S"`-test.log
}
load_rc_config $name
run_rc_command "$1"
I have added test_enable="YES" to /etc/rc.conf:
Code:
80# ./test rcvar
# test
test_enable=YES
It works when invoked manually (well, started at 23:40):
Code:
80# ./test start && ls /var/log/ | grep test
23-40-22-test.log
It just doesn't work upon startup
What am i missing?
Thank you!