Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Cannot run a script at shutdown time. Please Help!
@ 2003-10-31 20:09 btna
  2003-10-31 22:28 ` Eric de Redelijkheid
  0 siblings, 1 reply; 4+ messages in thread
From: btna @ 2003-10-31 20:09 UTC (permalink / raw)


All,

I am trying to run a script after cron has been stopped after running
a shutdown.

I have created the script under /sbin/init.d with the follwing
permissions:
-rwxr-xr-x   1 root     system      2488 Oct 24 12:12 script1

The script contains an if-statement for "start" and one for "stop".

I have created the following links for the "stop":

/sbin/rc0.d:
lrwxrwxrwx   1 root     bin           16 Oct 24 10:33 K00script1@ ->
../init.d/script1

and the same for /sbin/rc2.d.

For the "start":
lrwxrwxrwx   1 root     bin           16 Oct 21 11:06 S47script1@ ->
../init.d/script1

The start works well when the system starts. However, the stop
statement never gets called when I issue a shutdown.

What should i be looking at? what am I doing wrong?

Any help would be appreciated.

Thanks in advance,
BTNA


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot run a script at shutdown time. Please Help!
  2003-10-31 20:09 Cannot run a script at shutdown time. Please Help! btna
@ 2003-10-31 22:28 ` Eric de Redelijkheid
  2003-11-03 13:56   ` btna
  0 siblings, 1 reply; 4+ messages in thread
From: Eric de Redelijkheid @ 2003-10-31 22:28 UTC (permalink / raw)


Anno Domini 31-10-2003 21:09, btna sprak aldus:

That would depend how you shutdown. If you type: shutdown -h now (to a 
halt), no shutdown scripts are ever used; Tru64 simply shuts down.  
However is you type: shutdown now (to single user mode), your script 
should work.

Tru64 UNIX 5.1B has another flag to invoke stop scripts when shutting 
down: -s. If you type: shutdown -sh now, your script should work.

You have tested your script by typing: /sbin/init.d/script1 start and 
/sbin/init.d/script1 stop, I presume?

>All,
>
>I am trying to run a script after cron has been stopped after running
>a shutdown.
>
>I have created the script under /sbin/init.d with the follwing
>permissions:
>-rwxr-xr-x   1 root     system      2488 Oct 24 12:12 script1
>
>The script contains an if-statement for "start" and one for "stop".
>
>I have created the following links for the "stop":
>
>/sbin/rc0.d:
>lrwxrwxrwx   1 root     bin           16 Oct 24 10:33 K00script1@ ->
>../init.d/script1
>
>and the same for /sbin/rc2.d.
>
>For the "start":
>lrwxrwxrwx   1 root     bin           16 Oct 21 11:06 S47script1@ ->
>../init.d/script1
>
>The start works well when the system starts. However, the stop
>statement never gets called when I issue a shutdown.
>
>What should i be looking at? what am I doing wrong?
>
>Any help would be appreciated.
>
>Thanks in advance,
>BTNA
>  
>


-- 
-- "It's kind of...........a bummer." -- Ellen Feiss, student, 2002 --



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot run a script at shutdown time. Please Help!
  2003-10-31 22:28 ` Eric de Redelijkheid
@ 2003-11-03 13:56   ` btna
  2003-11-03 16:33     ` Eric de Redelijkheid
  0 siblings, 1 reply; 4+ messages in thread
From: btna @ 2003-11-03 13:56 UTC (permalink / raw)


Eric,

Thanks! How would I need to invoke the shutdown if i need to shutdown
and reboot? The way I was doing it was: shutdown -r now

The version we have is:
 UNIX V4.0G (Rev. 1530)

Thanks in advance,
BTNA

Eric de Redelijkheid <ericdere@xs4all.nl> wrote in message news:<3fa2e22a$0$18488$e4fe514c@dreader4.news.xs4all.nl>...
> Anno Domini 31-10-2003 21:09, btna sprak aldus:
> 
> That would depend how you shutdown. If you type: shutdown -h now (to a 
> halt), no shutdown scripts are ever used; Tru64 simply shuts down.  
> However is you type: shutdown now (to single user mode), your script 
> should work.
> 
> Tru64 UNIX 5.1B has another flag to invoke stop scripts when shutting 
> down: -s. If you type: shutdown -sh now, your script should work.
> 
> You have tested your script by typing: /sbin/init.d/script1 start and 
> /sbin/init.d/script1 stop, I presume?
> 
> >All,
> >
> >I am trying to run a script after cron has been stopped after running
> >a shutdown.
> >
> >I have created the script under /sbin/init.d with the follwing
> >permissions:
> >-rwxr-xr-x   1 root     system      2488 Oct 24 12:12 script1
> >
> >The script contains an if-statement for "start" and one for "stop".
> >
> >I have created the following links for the "stop":
> >
> >/sbin/rc0.d:
> >lrwxrwxrwx   1 root     bin           16 Oct 24 10:33 K00script1@ ->
> >../init.d/script1
> >
> >and the same for /sbin/rc2.d.
> >
> >For the "start":
> >lrwxrwxrwx   1 root     bin           16 Oct 21 11:06 S47script1@ ->
> >../init.d/script1
> >
> >The start works well when the system starts. However, the stop
> >statement never gets called when I issue a shutdown.
> >
> >What should i be looking at? what am I doing wrong?
> >
> >Any help would be appreciated.
> >
> >Thanks in advance,
> >BTNA
> >  
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot run a script at shutdown time. Please Help!
  2003-11-03 13:56   ` btna
@ 2003-11-03 16:33     ` Eric de Redelijkheid
  0 siblings, 0 replies; 4+ messages in thread
From: Eric de Redelijkheid @ 2003-11-03 16:33 UTC (permalink / raw)


In two steps:
#shutdown now (to single user mode)
#shutdown -r now (when in single user mode, behind the console :'( )

In Tru64 UNIX 5.1B this would be: #shutdown -rs now

Anno Domini 3-11-2003 14:56, btna sprak aldus:

>Eric,
>
>Thanks! How would I need to invoke the shutdown if i need to shutdown
>and reboot? The way I was doing it was: shutdown -r now
>
>The version we have is:
> UNIX V4.0G (Rev. 1530)
>
>Thanks in advance,
>BTNA
>
>Eric de Redelijkheid <ericdere@xs4all.nl> wrote in message news:<3fa2e22a$0$18488$e4fe514c@dreader4.news.xs4all.nl>...
>  
>
>>Anno Domini 31-10-2003 21:09, btna sprak aldus:
>>
>>That would depend how you shutdown. If you type: shutdown -h now (to a 
>>halt), no shutdown scripts are ever used; Tru64 simply shuts down.  
>>However is you type: shutdown now (to single user mode), your script 
>>should work.
>>
>>Tru64 UNIX 5.1B has another flag to invoke stop scripts when shutting 
>>down: -s. If you type: shutdown -sh now, your script should work.
>>
>>You have tested your script by typing: /sbin/init.d/script1 start and 
>>/sbin/init.d/script1 stop, I presume?
>>
>>    
>>
>>>All,
>>>
>>>I am trying to run a script after cron has been stopped after running
>>>a shutdown.
>>>
>>>I have created the script under /sbin/init.d with the follwing
>>>permissions:
>>>-rwxr-xr-x   1 root     system      2488 Oct 24 12:12 script1
>>>
>>>The script contains an if-statement for "start" and one for "stop".
>>>
>>>I have created the following links for the "stop":
>>>
>>>/sbin/rc0.d:
>>>lrwxrwxrwx   1 root     bin           16 Oct 24 10:33 K00script1@ ->
>>>../init.d/script1
>>>
>>>and the same for /sbin/rc2.d.
>>>
>>>For the "start":
>>>lrwxrwxrwx   1 root     bin           16 Oct 21 11:06 S47script1@ ->
>>>../init.d/script1
>>>
>>>The start works well when the system starts. However, the stop
>>>statement never gets called when I issue a shutdown.
>>>
>>>What should i be looking at? what am I doing wrong?
>>>
>>>Any help would be appreciated.
>>>
>>>Thanks in advance,
>>>BTNA
>>> 
>>>
>>>      
>>>


-- 
-- "It's kind of...........a bummer." -- Ellen Feiss, student, 2002 --



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-03 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-31 20:09 Cannot run a script at shutdown time. Please Help! btna
2003-10-31 22:28 ` Eric de Redelijkheid
2003-11-03 13:56   ` btna
2003-11-03 16:33     ` Eric de Redelijkheid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox