FreeBSD 5 rc.d scripts and /usr/local/etc/rc.d
Hi In the man pages for rc it says: The best way to handle rc.local, however, is to separate it out into rc.d/ style scripts and place them under /usr/local/etc/rc.d/. So I created an rc.d style script for my own service and stuck it in /usr/local/etc/rc.d/. It does not have a .sh on the end as it should run in a subshell as detailed in the rc man page. I also added myscript_enable=YES in /etc/rc.conf.local I can run my script by hand and it works. But when I boot it does not even try and run my script. How do you get rc.d style scripts in /usr/local/etc/rc.d/ to run at boot time? Thanks Chad ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD 5 rc.d scripts and /usr/local/etc/rc.d
In the immortal words of Chad Leigh -- Shire.Net LLC [EMAIL PROTECTED]... The best way to handle rc.local, however, is to separate it out into rc.d/ style scripts and place them under /usr/local/etc/rc.d/. That's right So I created an rc.d style script for my own service and stuck it in /usr/local/etc/rc.d/. It does not have a .sh on the end as it should run in a subshell as detailed in the rc man page. I also added There's your problem, all scripts in rc.d must have a .sh extension or they will be ignored (unless included from another script/program) rename to myscript.sh and it will work Cheers Tim -- Tim Aslat [EMAIL PROTECTED] Spyderweb Consulting http://www.spyderweb.com.au Phone: +61 0401088479 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD 5 rc.d scripts and /usr/local/etc/rc.d
On May 12, 2004, at 5:06 PM, Tim Aslat wrote: In the immortal words of Chad Leigh -- Shire.Net LLC [EMAIL PROTECTED]... The best way to handle rc.local, however, is to separate it out into rc.d/ style scripts and place them under /usr/local/etc/rc.d/. That's right So I created an rc.d style script for my own service and stuck it in /usr/local/etc/rc.d/. It does not have a .sh on the end as it should run in a subshell as detailed in the rc man page. I also added There's your problem, all scripts in rc.d must have a .sh extension or they will be ignored (unless included from another script/program) rename to myscript.sh and it will work However, the rc man page says: 4. Call each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to ``start'', and sources the script in a subshell. If the script has a .sh suffix then it is sourced directly into the current shell. So what you are saying is that rc on startup does NOT do the same stuff on /usr/local/etc/rc.d/ as it does on /etc/rc.d? It does not get a list, check them for nostart, order them and then run each one using run_rc_script()? If that is so, why does the man page say to make rc.d style scripts and place them under /usr/local/etc/rc.d if it is not going to do rc style processing on them? Trying to wrap my head around this Thanks Chad ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]