script to be executed on system startup.

Pietro Cerutti gahr at gahr.ch
Wed Feb 6 14:22:40 UTC 2008


navneet Upadhyay wrote:
> Hi,

Hello,

>       I have a script file, i want that script to be executed on system
> startup.
> 
>  I am doing this on Linux in following two steps : -
> 
> 1. Copying the script to /etc/rc.d directory.
> 2. /sbin/chkconfig --add "scriptname"
> 
> 
> I want to achieve the same on FreeBSD
> 
> chckconfig file is not present, documentation says i have to add it to
> rc.conf file.
> 
> How can i add it to rc.conf file, is there any command?

you just edit rc.conf and you add a line in the form

<your_script_name>_enable="YES"

Then you place the script <your_script_name> in /usr/local/etc/rc.d

at the bottom of the rc(8) man page there are a few examples on how to
build such a script.

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080206/1751e5be/signature.pgp


More information about the freebsd-questions mailing list