From owner-freebsd-questions Sat Dec 11 12:37:10 1999 Delivered-To: freebsd-questions@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 0E98414CFE for ; Sat, 11 Dec 1999 12:37:05 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id PAA65987; Sat, 11 Dec 1999 15:36:51 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <199912112036.PAA65987@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <001e01bf4416$a6f0c730$230a0cd0@SHURIKEN> Date: Sat, 11 Dec 1999 15:36:51 -0500 (EST) From: John Baldwin To: Marc Wandschneider Subject: RE: rc.sysinit alike file in FreeBSD? Cc: freebsd-questions@FreeBSD.org, Rob Kaper Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 11-Dec-99 Marc Wandschneider wrote: > > "rc.local is deprecated. Put a shell script in ${PREFIX}/etc/rc.d." > > Can you explain this line a bit more? What is ${PREFIX} ??? rc runs every file fitting the glob *.sh from a list of directories at the end of the startup. By default, this list contains /usr/local/etc/rc.d and /usr/X11R6/etc/rc.d. Ports (3rd party packages, such as yours) are typically installed in either /usr/local or /usr/X11R6. Whenever a port is being built under the ports system, the PREFIX make/environment variable is set to the destination location (for example, /usr/local). This way, a user can override where ports are installed if they want them all under /opt or something similar. Basically, if you create a file mydaemon.sh which is a Bourne shell (/bin/sh) script that starts up your daemon, then that small script can be copied to /usr/local/etc/rc.d (default value of ${PREFIX}/etc/rc.d) and it will be run on every switch from single-user to multi-user (including boot up). > marc. > > >> -----Original Message----- >> From: owner-freebsd-questions@FreeBSD.ORG >> Subject: RE: rc.sysinit alike file in FreeBSD? >> >> >> rc.local is deprecated. Put a shell script in >> ${PREFIX}/etc/rc.d. These >> scripts are run every time during single-user to multi-user. >> Re: sysinit, you >> can't use the boottime of the machine instead of the >> timestamp? Failing that, >> you could have a small utility that compared the timestamp >> with the boottime, >> and only update the timestamp if its older, then run that >> utility in the script >> in etc/rc.d/. (Or even put that functionality in the startup >> of the daemon.) -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message