Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Feb 2008 15:22:26 +0100
From:      Pietro Cerutti <gahr@gahr.ch>
To:        navneet Upadhyay <navneet.upadhyay@gmail.com>,  User Questions <freebsd-questions@freebsd.org>
Subject:   Re: script to be executed on system startup.
Message-ID:  <47A9C2A2.1070100@gahr.ch>
In-Reply-To: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com>
References:  <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHqcKlwMJqmJVx944RCk9QAJ9aHnTOrqcSOjNS6JxMBAdWKKcjJwCeKi1Y
4qnRfDYG99ecYJi1C1Y+gJE=
=BH1k
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A9C2A2.1070100>