From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 14:22:40 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09ECC16A41B for ; Wed, 6 Feb 2008 14:22:40 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9B24D13C4D1 for ; Wed, 6 Feb 2008 14:22:39 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 80-218-191-236.dclient.hispeed.ch ([80.218.191.236] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JMlAc-0006Rp-Pe; Wed, 06 Feb 2008 15:22:38 +0100 Message-ID: <47A9C2A2.1070100@gahr.ch> Date: Wed, 06 Feb 2008 15:22:26 +0100 From: Pietro Cerutti User-Agent: Thunderbird 2.0.0.9 (X11/20071121) MIME-Version: 1.0 To: navneet Upadhyay , User Questions References: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> In-Reply-To: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=9571F78E; url=http://www.gahr.ch/pgp Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigD9155C2A77350280E483E40A" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gahr.ch X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: Re: script to be executed on system startup. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 14:22:40 -0000 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 _enable=3D"YES" Then you place the script 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--