Boot Script Loop

  • Thread starter Deleted member 13721
  • Start date
D

Deleted member 13721

Guest
Hi, I'm using FreeBSD 9.0 Release.

I seem to be having a weird problem. Say I have a script that is
Code:
echo "stop zapping yourself!"
and I specify it in the rc.conf, it should only run during the boot process once right? In my situation the script wont stop and keeps running over and over again until the login screen comes up.

Then again, maybe it is just not designed to be used in this fashion.

Any clarification would be great.
 
Do NOT put scripts in /etc/rc.conf. It's designed to ONLY have variables. It gets sourced multiple times during the boot phase.

If you need some custom script to run during boot put it in /etc/rc.local.
 
Ok thank you SirDice, that worked and I am happy. Just to clarify for anyone else who reads this:/etc/rc.local does not exist by default and has to be created as a file, then you put the path to the script in the file and make the script executable.
 
Just make sure you daemonize longer running processes invoked from /etc/rc.local. Init will wait for rc.local script to finish, so several rc.d based initscripts will wait, together with tty(0).
 
Back
Top