atom feed29 messages in org.freebsd.freebsd-questionsscript to be executed on system startup.
FromSent OnAttachments
navneet UpadhyayFeb 6, 2008 6:09 am 
Pietro CeruttiFeb 6, 2008 6:22 am 
Derek RagonaFeb 6, 2008 6:22 am 
Wojciech PucharFeb 6, 2008 6:31 am 
navneet UpadhyayFeb 6, 2008 6:33 am 
Derek RagonaFeb 6, 2008 6:44 am 
Ivan VorasFeb 6, 2008 6:53 am 
Ivan VorasFeb 6, 2008 6:59 am 
Wojciech PucharFeb 6, 2008 7:35 am 
Zbigniew SzalbotFeb 6, 2008 7:39 am 
Jerry McAllisterFeb 6, 2008 7:40 am 
Jerry McAllisterFeb 6, 2008 7:46 am 
Jerry McAllisterFeb 6, 2008 7:52 am 
Zbigniew SzalbotFeb 6, 2008 7:54 am 
Wojciech PucharFeb 6, 2008 8:49 am 
Zbigniew SzalbotFeb 6, 2008 8:51 am 
Alex ZbyslawFeb 6, 2008 9:22 am 
Jerry McAllisterFeb 6, 2008 9:29 am 
Paul SchmehlFeb 6, 2008 9:35 am 
Ivan VorasFeb 6, 2008 9:52 am 
Dominic FandreyFeb 6, 2008 10:50 am 
RWFeb 6, 2008 10:56 am 
RWFeb 6, 2008 11:03 am 
Ivan VorasFeb 7, 2008 2:16 am 
navneet UpadhyayFeb 7, 2008 5:49 am 
RWFeb 9, 2008 10:10 am 
Matthew SeamanFeb 9, 2008 10:22 am 
Dominic FandreyFeb 9, 2008 11:02 am 
RWFeb 9, 2008 7:03 pm 
Subject:script to be executed on system startup.
From:Derek Ragona (der@computinginnovations.com)
Date:Feb 6, 2008 6:44:48 am
List:org.freebsd.freebsd-questions

At 08:33 AM 2/6/2008, navneet Upadhyay wrote:

i dont want to go with the rename option, as if tomorrow i want to add more scripts to run at startup i will be in a mess.

I will tell in detail so that it would be easy for you to understand my problem :-

Intention is that the script file should be called at both startup and shutdown.

In Linux after doing :- 1. Copying the script to /etc/rc.d directory. 2. /sbin/chkconfig --add "scriptname"

While startup scriptfile is called with parameter start and while shutdown it is called with parameter stop.

So i check the parameter value in the script and if it is start , i run my executables and if it is stop i gracefully exit from my executables.

I want to achie same thing in FreeBSD.

Thanks, Navneet

All scripts in /usr/local/etc/rc.d are sent the "start" parameter at bootup and the "stop" parameter at shutdown. So this is exactly what you are looking for. If your script isn't running correctly check the paths to the executables, and also put some echo statements in the script to follow the logic to debug it.

-Derek