Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 1999 15:28:40 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Rob Kaper <cap@capsi.cx>
Cc:        freebsd-questions@FreeBSD.org
Subject:   RE: rc.sysinit alike file in FreeBSD?
Message-ID:  <199912112028.PAA64986@server.baldwin.cx>
In-Reply-To: <19991211210027.A20861@capsi.cx>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <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?199912112028.PAA64986>