Date: Sat, 11 Dec 1999 15:36:51 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Marc Wandschneider <marcw@lanfear.com> Cc: freebsd-questions@FreeBSD.org, Rob Kaper <cap@capsi.cx> Subject: RE: rc.sysinit alike file in FreeBSD? Message-ID: <199912112036.PAA65987@server.baldwin.cx> In-Reply-To: <001e01bf4416$a6f0c730$230a0cd0@SHURIKEN>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912112036.PAA65987>