Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Dec 2003 16:53:42 -0800
From:      Daniel Rudy <dcrudy@pacbell.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Controlling init on shutdown/reboot
Message-ID:  <3FD12896.8040705@pacbell.net>
In-Reply-To: <001c01c3b8ab$fce350a0$a4b826cb@goo>
References:  <3FCB1B0C.6080902@pacbell.net><007201c3b7fe$c6635280$a4b826cb@goo> <3FCBE16E.5010204@pacbell.net> <001c01c3b8ab$fce350a0$a4b826cb@goo>

next in thread | previous in thread | raw e-mail | index | archive | help
Somewhere around the time of 12/02/2003 00:12, the world stopped and
listened as Rob contributed this to humanity:
> I haven't used ppp(8) - I prefer pppd(8) -  so I'm not familiar with
> ppp.linkdown.sh. If this is a shell script, there's a couple of things that
> I've seen cause strange script behaviour: lack of default environment and
> lack of TTY. This usually shows up in scripts that work fine at the command
> line, but fail under other circumstances (such as crontabs).
> 
> Does it take more than 2 minutes at the command line?
> 
> Have you tried adding
> 
>     set -x
> 
> at the start to see where it's failing? If it's called by rc.shutdown the
> output should be to the console, but I'm not sure what ppp(8) does with
> script output.
> 

The script is called by ppp on a link down event.  That is a link down
for ANY reason, including a shutdown.  The problem is that ppp doesn't
differentiate on why the link went down, just that it went down.  Now,
when rc.shutdown executes, it writes a stop file to /tmp that
ppp.linkdown.sh checks for.  If it finds that file, then I have it do
something alittle different.  Does it take long to execute?  Nope, it
runs quite fast, which may be part of the problem.  Because this is
called from ppp and not rc.shutdown, init is killing it before it
finishes because init thinks that it is not part of the system shutdown
sequence.
-- 
Daniel Rudy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FD12896.8040705>