Operating System - HP-UX
1834148 Members
2131 Online
110064 Solutions
New Discussion

Re: Script hanging issue again

 
Jeff_Traigle
Honored Contributor

Script hanging issue again

Last week, I posted about a script that appeared to hang randomly. I've managed to duplicate the problem consistently now. Because the system needs to reboot whether or not the PDC patch gets installed, I added some logic to do that. So now that it's hanging consistantly on my test system, I notice that the shutdown process appears to be what's hanging things up (and presumably the autoreboot from the PDC patch previously on occasion). I see shutdown in the process list, I get the broadcast message on the console that it's going down, but it never actually initiates the rc script to perform the shutdown. I've never seen this happen before. Any ideas?
--
Jeff Traigle
3 REPLIES 3
Jeff_Traigle
Honored Contributor

Re: Script hanging issue again

Hmmm... naturally, just as I send this something occurs to me... any chance it's because I used "shutdown -r 10" instead of "shutdown -r -y 10"? :)
--
Jeff Traigle
Sundar_7
Honored Contributor

Re: Script hanging issue again

Hi,

Yes, I think that is the problem.

# shutdown -r 10

SHUTDOWN PROGRAM
03/29/04 11:13:10 PST
Waiting a grace period of 10 seconds for users to logout.
Do not turn off the power or press reset during this time.

Broadcast Message from root (pts/ta) Mon Mar 29 11:13:20...
SYSTEM BEING BROUGHT DOWN NOW ! ! !

Do you want to continue? (You must respond with 'y' or 'n'.):

This is what happens.

System just keeps waiting on the prompt. I dont know if there is a time out for this prompt.

You should use shutdown -r -y 10

Sundar
Learn What to do ,How to do and more importantly When to do ?
Jeff_Traigle
Honored Contributor

Re: Script hanging issue again

There's no timeout on it... or at least not one that is within 5 minutes or so.

I also had to schedule the reboot for a minute later via at. Otherwise the script that this script was run from would get killed and the shutdown would be aborted. I tried putting the shutdown in the background to allow things to complete, but that just sent the system into single user mode. Not sure I understand why it did that, but, as long as I have a workable solution, I guess it's a matter of trivia and not terribly important.
--
Jeff Traigle