Or better still just check if the pid mentioned in the file is actually
running and corresponds to the process that is supposed to have started
Balaji

-----Original Message-----
From: Andrew Dacey [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 2:42 PM
To: Balaji Srinivasan; [EMAIL PROTECTED]
Subject: Re: [gentoo-user] Any way to put the startup scripts in debug
mode?


I thought the stuff in /mnt/.init.d was tmpfs which means it's stored in
memory. In that case, as soon as you reboot it will be wiped. I think the
problem is that the pid is stored in /var/run/ and if there's already an
existing file there, it's assumed the process is running. What might be nice
is if it would check if the creation time (or maybe modified time depending
on how it sets up the pid file) was older than the time of reboot, check to
see if the service is running on that pid and if not, run a zap and then
start.

Andrew Dacey
[EMAIL PROTECTED]
Technical Support
Eastlink, HSI
453-2800 or 1-888-345-1111
----- Original Message -----
From: "Balaji Srinivasan" <[EMAIL PROTECTED]>
To: "'Todd Punderson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 6:12 PM
Subject: RE: [gentoo-user] Any way to put the startup scripts in debug mode?


>
> This doesnt help because now I have to find out if the process crashed
> before doing zap.
> I can understand why gentoo keeps the provides etc info in the
/mnt/.init.d
> files. But why
> keep started etc in there. Even if it keeps it it should do a pid check
> before just complaining
> that it is already started.
> Balaji
> -----Original Message-----
> From: Todd Punderson [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 1:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [gentoo-user] Any way to put the startup scripts in debug
> mode?
>
>
> Check out /etc/init.d/<service> zap
> Todd
> ----- Original Message -----
> From: "Balaji Srinivasan" <[EMAIL PROTECTED]>
> To: "'brett holcomb'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, March 03, 2003 3:38 PM
> Subject: RE: [gentoo-user] Any way to put the startup scripts in debug
mode?
>
>
> > The problem as i see with this approach is that if someone kills a
process
> > by hand (or it crashes), the start up scripts dont recognize it. This is
> > because as far as /mnt/.init.d is concerned it is still started.
> > Balaji
> >
> > -----Original Message-----
> > From: brett holcomb [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 03, 2003 12:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [gentoo-user] Any way to put the startup scripts in debug
> > mode?
> >
> >
> > If I remember correctly /mnt/.init.d is created during
> > startup as it's a memory resident file.
> >
> >
> > On Mon, 3 Mar 2003 12:26:40 -0800
> >   Balaji Srinivasan <[EMAIL PROTECTED]>
> > wrote:
> > >Hi Everyone
> > >Is there any easy way to have /sbin/runscript and the
> > >start-stop-daemon
> > >print out some reasonable debug logs when it fails? Its
> > >really irritating to
> > >see those two !! marks to say the startup failed but have
> > >no idea why it
> > >failed. I had to do an strace to find out that it looks
> > >at /mnt/.init.d/ for
> > >a lot of info etc. Why cant it depend on runtime
> > >information rather than
> > >depend on info from the file system which could be out of
> > >date.
> > >Thanks
> > >Balaji
> > >
> > >--
> > >[EMAIL PROTECTED] mailing list
> > >
> >
> >
> > --
> > [EMAIL PROTECTED] mailing list
> >
> > --
> > [EMAIL PROTECTED] mailing list
> >
> >
>
>
> --
> [EMAIL PROTECTED] mailing list
>
> --
> [EMAIL PROTECTED] mailing list
>
>

--
[EMAIL PROTECTED] mailing list

Reply via email to