Operating System - HP-UX
1851715 Members
4515 Online
104062 Solutions
New Discussion

shutdown scripts not executed

 
Penni Nussbaum
Frequent Advisor

shutdown scripts not executed

I used the command shutdown "shutdown -r -y 0" to halt my system. However, it looks like the shutdown scripts did not execute. Why?
10 REPLIES 10
S.K. Chan
Honored Contributor

Re: shutdown scripts not executed

Did you run at / level ? Use the full path for shutdown command.

/etc/shutdown -r -y 0
Victor BERRIDGE
Honored Contributor

Re: shutdown scripts not executed

Hi,
In what level were you when you typed the shutdown command?
TO see in your scripts worked look at /etc/rc.log.old


All the best

Victor
James R. Ferguson
Acclaimed Contributor

Re: shutdown scripts not executed

Hi Penni:

Have a look at '/etc/rc.log.old'. This will tell the tale.

Regards!

...JRF...

Frederic Sevestre
Honored Contributor

Re: shutdown scripts not executed

Hi,
In addition you can check the /etc/shutdown.allow.
Crime doesn't pay...does that mean that my job is a crime ?
Krishna Prasad
Trusted Contributor

Re: shutdown scripts not executed

I use shutdown -r now
other then that everyone seems to be on the right page of asking what run level you are at.

Use who -r to find this out.

Another thing could be that someone moved the reboot command or changed the permisions on this file. shutdown actually calls reboot.
Positive Results requires Positive Thinking
Frederic Sevestre
Honored Contributor

Re: shutdown scripts not executed

Sorry, I misanderstood your question.
No use checking the shutdown.allow to find the sutdown scripts failure.
Crime doesn't pay...does that mean that my job is a crime ?
Penni Nussbaum
Frequent Advisor

Re: shutdown scripts not executed

the /etc/rc.log.ol only have the start up scripts in them. That's why I'm assuming the shutdown scripts did not execute. If they did, shouldn't they bi in this file?
Darrell Allen
Honored Contributor

Re: shutdown scripts not executed

Hi Penni,

What output did you get or did the command just "sit there"?

By the way, -r does a reboot after shutdown. -h does a halt.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Sanjay_6
Honored Contributor

Re: shutdown scripts not executed

Hi Penni,

The /etc/rc.log.old file should have both the startup and shutdown log for the last boot.

also try this shutdown command,

shutdown -h now
shutdown -r now

run this from the / directory.

Hope this helps.

Regds
Roger Baptiste
Honored Contributor

Re: shutdown scripts not executed


Hi, did the system actually
do the shutdown(reboot)?? or did it return back to the prompt? What was the response you got on the console after executing the shutdown command??
Do you have all the kill scripts in /sbin/rc?.d
i.e the Knnn scripts under /sbin/rc?.d .

What does /etc/shutdownlog show??
Has the syslog file been renamed as OLDsyslog after the shutdown??

HTH
raj
Take it easy.