From owner-freebsd-current@FreeBSD.ORG Tue May 25 14:08:32 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6B1E16A4CE for ; Tue, 25 May 2004 14:08:32 -0700 (PDT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BA6343D31 for ; Tue, 25 May 2004 14:08:32 -0700 (PDT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Tue, 25 May 2004 14:08:12 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 9728A5D08; Tue, 25 May 2004 14:08:12 -0700 (PDT) To: Rob In-reply-to: Your message of "Tue, 25 May 2004 12:04:52 +0900." <40B2B7D4.5040106@users.sourceforge.net> Date: Tue, 25 May 2004 14:08:12 -0700 From: "Kevin Oberman" Message-Id: <20040525210812.9728A5D08@ptavv.es.net> cc: freebsd-current@freebsd.org Subject: Re: Where to put my own startup script (/etc/rc.local ?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2004 21:08:32 -0000 You can put them in /usr/local/etc/rc.d or /etc/rc.d. The former is the more acceptable and should be used if the startup can be run at the end of the startup. The latter is not ideal, but it allows the script to be run (see rcorder(8)) at most any point in the startup when adequate resources are available. I would urge you to go with /usr/local/etc/rc.d. The script must be executable, have a name ending in .sh, and support (even if the support is to ignore) at least the 'start' and 'stop' commands. Most scripts seem to support "restart", but I don't recall if it's mandatory. Take a look at files in those directories for examples of how to set up the files. Ports that have startup scripts include net/rsync, sysutils/LPRng and sysutils/portupgrade. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634