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
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD9155C2A77350280E483E40A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable navneet Upadhyay wrote: > Hi, Hello, > I have a script file, i want that script to be executed on system= > startup. >=20 > I am doing this on Linux in following two steps : - >=20 > 1. Copying the script to /etc/rc.d directory. > 2. /sbin/chkconfig --add "scriptname" >=20 >=20 > I want to achieve the same on FreeBSD >=20 > chckconfig file is not present, documentation says i have to add it to > rc.conf file. >=20 > 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=3D"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. --=20 Pietro Cerutti PGP Public Key: http://gahr.ch/pgp --------------enigD9155C2A77350280E483E40A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHqcKlwMJqmJVx944RCk9QAJ9aHnTOrqcSOjNS6JxMBAdWKKcjJwCeKi1Y 4qnRfDYG99ecYJi1C1Y+gJE= =BH1k -----END PGP SIGNATURE----- --------------enigD9155C2A77350280E483E40A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A9C2A2.1070100>