Operating System - HP-UX
1753534 Members
5165 Online
108795 Solutions
New Discussion юеВ

Re: HP-UX startup hang confusion

 
Rex Pommier
Frequent Advisor

HP-UX startup hang confusion

Hi.

I am stumped on this one and hope somebody cn shed some light on it. I am having HP-UX 11.23 hang on startup. I have narrowed the problem down to a specific startup script. I am getting no error messages on the console, it is just hanging. When I enter a control-backslash on the console the startup continues. My questions are why the hang is occurring and why it's occurring where it is.

The sequence of events is:

HP-UX is booted,
fsck's run
log replays run
cleaning /etc/ptmp...
[copyright is displayed]
"/sbin/auto_parms: DHCP access is disabled" message

startup hangs here. I enter ctrl-backslash and I get:

"HP-UX Start-up in progress"
followed by the startup messages

If I remove a startup script from the end of the rc2.d directory (S900 level script), the startup runs without problem. This script was supplied by a vendor and doesn't perform the normal start_msg, stop_msg, start, stop format but runs a couple "su - userid -c" commands.

I've already removed anything that I can see from the startup script that would do terminal I/O. The userid that is being "su-ed" to is running the csh instead of the posix sh.

Why would a script being run at the end of the startup cause the startup to hang before displaying any of the messages that the rc1.d and rc2.d scripts would display?

Any ideas on how to debug this mess?

Thanks.

7 REPLIES 7
John McWilliams_1
Frequent Advisor

Re: HP-UX startup hang confusion

Hi
Are you able to run the script on its own after startup is complete, or are there errors runing it. This may help to debug it.Maybe you can modify it to have the start and stop message.

Cheers John
Rex Pommier
Frequent Advisor

Re: HP-UX startup hang confusion

script runs fine outside the startup. No errors, just the "echo"ed messages out of the script.
Bill Costigan
Honored Contributor

Re: HP-UX startup hang confusion

The script might be trying to do things that depend on stuff that have not been enabled yet.

Also the the environment may not be set the same in the rc world as in the normal world.

Lastly, I would add some echo commands to a file that would allow you to see where the script 'hangs'
Naveej.K.A
Honored Contributor

Re: HP-UX startup hang confusion

Is your script sourcing the config files from /etc/rc.config.d/? Do you want to check the contents in /etc/rc.config.d/ and check if anything wrong over there.

Regards,
Naveej
practice makes a man perfect!!!
Dennis Handly
Acclaimed Contributor

Re: HP-UX startup hang confusion

Using the scummy csh is never a good idea.
I've had it hang in scripts because it is doing terminal I/O. If you can redirect stdin to /dev/null, that may fix it.
Rex Pommier
Frequent Advisor

Re: HP-UX startup hang confusion

I still don't know exactly how this was happening in the sequence it was, but I appreciate all the suggestions. I ended up getting it to work by pulling the vendor scripts out of the startup and building "standard" startup scripts that called the vendor scripts. I had to still fix their scripts to get them to work but that's another story. :-)

I'm now outta here until the new year so I'll close the thread.
Rex Pommier
Frequent Advisor

Re: HP-UX startup hang confusion

Pulled the vendor scripts out of the startup and built standard scripts to call the vendor-supplied ones.