[Nottingham] Redhat Init

Mike Martin nottingham at mailman.lug.org.uk
Thu Jul 10 09:41:01 2003

 --- Alex Tibbles <alex_tibbles@yahoo.co.uk> wrote: > > Is the script
modified from a skeleton init.d
> > script, with the proper start / 
> > stop etc?  If so, then fill in the fields in the
> > header and use checkconfig 
> > to install it.
> Thanks for that (chkconfig, yes?). I'll look into that
> later when the program will be (probably) a
> start|stop|restart'able daemon.
> > Otherwise, I think RH has an rc.local script that's
> > run at end of startup.  
> > You can use to run it from there.
> That's what I initially (sorry for the pun) tried and
> seemed to get nothing - putting it in rc.local (it's
> S99local->../rc.local). Can you think of anything that
> would stop this working? 

The obvious is that when you run rc.local from a shell you have a
user environment (path . files etc) whilst you dont directly from

An extreme case that comes to mind is fetchmail, which runs from a
~/.fetchmailrc, so if you run it from rc.local you need to specify
the conf file

My test was running exactly
> the same command as was in the rc.local from a root
> terminal (which worked). Do you know where I can find
> information about what went wrong? (Where is syslog on
> RH8 - it's not /var/log/syslog?!).
> > It's perfectly possible to run short running scripts
> > and programs from init.d, 
> > without them being cleanly daemonised.  The
> > detaching is to avoid getting 
> > signals from the terminal it was started from, which
> > might be embaressing and 
> > have unpredictable results.
> Could this be causing the execution from rc.local to
> fail?
> I'll proceed with daemonizing, using a skeleton init
> script and using chkconfig because the program really
> is a daemon, it's just doesn't know it yet :)
> thanks for your help.
> alex
> Want to chat instantly with your online friends?  Get the FREE
> Yahoo!
> Messenger http://uk.messenger.yahoo.com/
> _______________________________________________
> Nottingham mailing list
> Nottingham@mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/nottingham 

Yahoo! Plus - For a better Internet experience