From owner-freebsd-questions Sat Dec 11 12:28:53 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 3DF4415014 for ; Sat, 11 Dec 1999 12:28:51 -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 PAA64986; Sat, 11 Dec 1999 15:28:40 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <199912112028.PAA64986@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: <19991211210027.A20861@capsi.cx> Date: Sat, 11 Dec 1999 15:28:40 -0500 (EST) From: John Baldwin To: Rob Kaper Subject: RE: rc.sysinit alike file in FreeBSD? Cc: freebsd-questions@FreeBSD.org Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 11-Dec-99 Rob Kaper wrote: > Hi, > > I am porting a Linux program to FreeBSD. The program's functionality relies > on two start-up files: > > rc.local --> starts the daemon in the background > rc.S/sysinit --> creates a timestamp on startup > > It's very important for the way the program functions that creating the > timestamp during startup only happens ONCE, no matter if runlevels are > switched, etc etc. > > I have found rc.local, is there a FreeBSD equivalent to this rc.S or > rc.sysinit file and what is it? Would it also work on different *BSD's or > not? 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.) > Rob > -- > Rob Kaper | mail: cap@capsi.com + cap@capsi.cx > | web: http://capsi.com/ + http://capsi.cx/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- 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