Re: Controlling init on shutdown/reboot

2003-12-05 Thread Daniel Rudy
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

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Controlling init on shutdown/reboot

2003-12-02 Thread Rob
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.

- Original Message -
From: Daniel Rudy [EMAIL PROTECTED]
Subject: Re: Controlling init on shutdown/reboot


 Somewhere around the time of 12/01/2003 03:32, the world stopped and
 listened as Rob contributed this to humanity:

 From line 99 of /usr/src/sbin/init/init.c,
 
#define DEATH_SCRIPT  120  /* wait for 2min for /etc/rc.shutdown */
 
  and on line 1576 it looks like you can change this with the sysctl
  'kern.shutdown_timeout'.
 
  But 2 minutes is a long time for a shell script - are you sure that
  everything is working correctly?

 The problem is that a ppp.linkdown.sh script needs to do something and
 it's not doing it.  Works fine if I execute the script normally from the
 command line though using the approperiate parameters that ppp would
 send it.  It seems that init is killing the script before the script can
 finish, which is the problem.

 BTW, that oid, kern.shutdown_timeout does not exist.  I'm running
 4.9-RELEASE.


  - Original Message -
  From: Daniel Rudy [EMAIL PROTECTED]
  Subject: Controlling init on shutdown/reboot
 
 
 
 Hello,
 
 How does one allocate more time for /etc/rc.shutdown?  It seems that
 some of my scripts are not being executed when the system shuts down or
 reboots.
 
 --
 Daniel Rudy
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 
  [EMAIL PROTECTED]
 
 


 --
 Daniel Rudy

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Controlling init on shutdown/reboot

2003-12-01 Thread Daniel Rudy
Hello,

How does one allocate more time for /etc/rc.shutdown?  It seems that
some of my scripts are not being executed when the system shuts down or
reboots.

-- 
Daniel Rudy

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Controlling init on shutdown/reboot

2003-12-01 Thread Rob
From line 99 of /usr/src/sbin/init/init.c,

  #define DEATH_SCRIPT  120  /* wait for 2min for /etc/rc.shutdown */

and on line 1576 it looks like you can change this with the sysctl
'kern.shutdown_timeout'.

But 2 minutes is a long time for a shell script - are you sure that
everything is working correctly?

- Original Message -
From: Daniel Rudy [EMAIL PROTECTED]
Subject: Controlling init on shutdown/reboot


 Hello,

 How does one allocate more time for /etc/rc.shutdown?  It seems that
 some of my scripts are not being executed when the system shuts down or
 reboots.

 --
 Daniel Rudy

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Controlling init on shutdown/reboot

2003-12-01 Thread Daniel Rudy
Somewhere around the time of 12/01/2003 03:32, the world stopped and
listened as Rob contributed this to humanity:

From line 99 of /usr/src/sbin/init/init.c,
 
   #define DEATH_SCRIPT  120  /* wait for 2min for /etc/rc.shutdown */
 
 and on line 1576 it looks like you can change this with the sysctl
 'kern.shutdown_timeout'.
 
 But 2 minutes is a long time for a shell script - are you sure that
 everything is working correctly?

The problem is that a ppp.linkdown.sh script needs to do something and
it's not doing it.  Works fine if I execute the script normally from the
command line though using the approperiate parameters that ppp would
send it.  It seems that init is killing the script before the script can
finish, which is the problem.

BTW, that oid, kern.shutdown_timeout does not exist.  I'm running
4.9-RELEASE.


 - Original Message -
 From: Daniel Rudy [EMAIL PROTECTED]
 Subject: Controlling init on shutdown/reboot
 
 
 
Hello,

How does one allocate more time for /etc/rc.shutdown?  It seems that
some of my scripts are not being executed when the system shuts down or
reboots.

--
Daniel Rudy

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
 
 [EMAIL PROTECTED]
 
 


-- 
Daniel Rudy

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]