| From | Sent On | Attachments |
|---|---|---|
| navneet Upadhyay | Feb 6, 2008 6:09 am | |
| Pietro Cerutti | Feb 6, 2008 6:22 am | |
| Derek Ragona | Feb 6, 2008 6:22 am | |
| Wojciech Puchar | Feb 6, 2008 6:31 am | |
| navneet Upadhyay | Feb 6, 2008 6:33 am | |
| Derek Ragona | Feb 6, 2008 6:44 am | |
| Ivan Voras | Feb 6, 2008 6:53 am | |
| Ivan Voras | Feb 6, 2008 6:59 am | |
| Wojciech Puchar | Feb 6, 2008 7:35 am | |
| Zbigniew Szalbot | Feb 6, 2008 7:39 am | |
| Jerry McAllister | Feb 6, 2008 7:40 am | |
| Jerry McAllister | Feb 6, 2008 7:46 am | |
| Jerry McAllister | Feb 6, 2008 7:52 am | |
| Zbigniew Szalbot | Feb 6, 2008 7:54 am | |
| Wojciech Puchar | Feb 6, 2008 8:49 am | |
| Zbigniew Szalbot | Feb 6, 2008 8:51 am | |
| Alex Zbyslaw | Feb 6, 2008 9:22 am | |
| Jerry McAllister | Feb 6, 2008 9:29 am | |
| Paul Schmehl | Feb 6, 2008 9:35 am | |
| Ivan Voras | Feb 6, 2008 9:52 am | |
| Dominic Fandrey | Feb 6, 2008 10:50 am | |
| RW | Feb 6, 2008 10:56 am | |
| RW | Feb 6, 2008 11:03 am | |
| Ivan Voras | Feb 7, 2008 2:16 am | |
| navneet Upadhyay | Feb 7, 2008 5:49 am | |
| RW | Feb 9, 2008 10:10 am | |
| Matthew Seaman | Feb 9, 2008 10:22 am | |
| Dominic Fandrey | Feb 9, 2008 11:02 am | |
| RW | Feb 9, 2008 7:03 pm |
| Subject: | script to be executed on system startup. | |
|---|---|---|
| From: | Jerry McAllister (jerr...@msu.edu) | |
| Date: | Feb 6, 2008 7:52:05 am | |
| List: | org.freebsd.freebsd-questions | |
On Wed, Feb 06, 2008 at 04:39:40PM +0100, Zbigniew Szalbot wrote:
Hello,
2008/2/6, Wojciech Puchar <woj...@wojtek.tensor.gdynia.pl>:
(for example: "/etc/rc.d/myscript") 2. chmod a+x the script 3. you're done.
This will work for the recent versions of FreeBSD (you didn't say for which version do you need it).
you need to make that script react for "start" and "stop" commands at least
I just symlinked my sh script to /usr/local/etc/rc.d/ and it works quite well without even touching rc.conf.
If your script dosn't have need of any information or configuration from outside, then you don't need to put anything in /etc/rc.conf. But, it is available if you need it.
As for start and stop, the system will pass start on a bootup and stop on a shutdown. It is appropriate to check at least for start in your script and only startup if it is set so you don't try to start it at shutdown. But, if there is something you would like to do at shutdown, then also make a section of the script for shutdown and then check for 'stop' and run that part when it is present and 'start' is not present. If both are set, then it is a bad error somewhere.
////jerry
HTH
Zbigniew Szalbot
_______________________________________________ free...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "free...@freebsd.org"





