FreeBSD 4.8 local startup issues

Ruben de Groot mail23 at bzerk.org
Tue Sep 9 04:39:04 PDT 2003


On Mon, Sep 08, 2003 at 09:59:46PM -0800, admin typed:
> On Mon, 08 Sep 2003 22:42:24 -0700, K Anderson wrote
> > admin wrote:
> > > running:
> > > FreeBSD 4.8-STABLE
> > > 
> > > okay I am having a strange issue.
> > > 
> > > after the last reboot after my FreeBSD machine became unreachable - and
> > > required a power cycle.  mostly all processes listed in /usr/local/etc/rc.d
> > > did not start.  this only happens very rarely and has happens after FreeBSD
> > > crashed or is not brought down very cleanly.  can somebody recommend a way to
> > > auto run these scripts - and make sure these files get executed on boot up.
> > > 
> > > how can I make sure processes are running correctly with automation.   
> > > 
> > > the following line exists in my /etc/defaults/rc.conf file:
> > > 
> > > --- snip ---
> > > 
> > > local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.
> > > 
> > > --- snip ---
> > > 
> > > - noah
> > > _______________________________________________
> > > freebsd-questions at freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> > > 
> > You can create some sort of cron task that checks for running 
> > processes and if it doesn't see it then it starts it up accordingly.
> 
> 
> okay cool.  thanks for responding.  do you have an example of a script that
> can do this.  say the machine does not shut down properly - arent there stale
> .pid files left behind.  how do I account for this in the cron job script? 
> are there other ways to write this script to make sure things start properly
> and remain running?

Something like this will remove stale .pid files:
(in /etc/crontab)

@reboot	root	cd /var/run; /bin/rm -rf *.pid

Ruben

> 
> - Noah
> 
> 
> 
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list