GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- init script problem during bootup
Operating System - HP-UX
1844003
Members
2497
Online
110226
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 09:03 AM
05-27-2004 09:03 AM
init script problem during bootup
HP-UX 11.11
I created init script to start ssh daemon from a template in /sbin/init.d and created /etc/config.d/ file with configuration and added proper links to start it in runlevel 3,which is default for my system.
When I run script by hand from console,ie: /sbin/init.d/sshd start it starts ok.When i do init 2 and then init 3 script also runs ok. But during boot it doesn`t start daemon,although script is executed.I inserted commands like echo "running script..." > /tmp/log and echo "script ran..." >> /tmp/log. It seems like sshd dies...
I searched this forum and found simular problems.I will try with nohup option and some other tips.(but: sshd when started from console goes into backgorund automatically...)
Also,i tried to create 2nd script,which runs oracle with help off dbstart script.Same effect,so it doesn`t look like sshd problem.
Can anyone describe this situation cleanly? I want to understand what is the difference between boot process,when switching to 3rd runlevel and manual command init 3 when in runlevel 2 ? Why daemon can`t start?
I created init script to start ssh daemon from a template in /sbin/init.d and created /etc/config.d/ file with configuration and added proper links to start it in runlevel 3,which is default for my system.
When I run script by hand from console,ie: /sbin/init.d/sshd start it starts ok.When i do init 2 and then init 3 script also runs ok. But during boot it doesn`t start daemon,although script is executed.I inserted commands like echo "running script..." > /tmp/log and echo "script ran..." >> /tmp/log. It seems like sshd dies...
I searched this forum and found simular problems.I will try with nohup option and some other tips.(but: sshd when started from console goes into backgorund automatically...)
Also,i tried to create 2nd script,which runs oracle with help off dbstart script.Same effect,so it doesn`t look like sshd problem.
Can anyone describe this situation cleanly? I want to understand what is the difference between boot process,when switching to 3rd runlevel and manual command init 3 when in runlevel 2 ? Why daemon can`t start?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 11:09 AM
05-27-2004 11:09 AM
Re: init script problem during bootup
I have a question :
while the system is starting up, executing rcX.d/Sxxx scripts where you see the pass/fail status screens, do you see your init script being processed ? If yes, is it exiting with "OK" status ?
If the answer to all of the above is YES, then if I were you I would put some sort of a checking mechanism at the end of my init script like
...
/opt/ssh/sbin/sshd
sleep 5
ps -ef | grep sshd | grep -v grep >/tmp/dump
result=`echo $?`
if [ $result -ne 0 ]
then
# either set EXITSTATUS to nonzero for this script and finish execution
# or retry starting it again
# upto you
fi
...
exit $EXITSTATUS
while the system is starting up, executing rcX.d/Sxxx scripts where you see the pass/fail status screens, do you see your init script being processed ? If yes, is it exiting with "OK" status ?
If the answer to all of the above is YES, then if I were you I would put some sort of a checking mechanism at the end of my init script like
...
/opt/ssh/sbin/sshd
sleep 5
ps -ef | grep sshd | grep -v grep >/tmp/dump
result=`echo $?`
if [ $result -ne 0 ]
then
# either set EXITSTATUS to nonzero for this script and finish execution
# or retry starting it again
# upto you
fi
...
exit $EXITSTATUS
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 12:05 PM
05-27-2004 12:05 PM
Re: init script problem during bootup
Hello,
For ssh I suggest you consider running HP's version of it. It is avalable from a link at
http://www.hp.com/products1/unix/operating/security/index.html#network
Be sure to get the Strong Random Number Generator also from a link on that page.
Here's the direct link for ssh
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA
The HP depot for ssh will install init scripts.
I realize this won't answer your question regarding init scirpts, but it will address your ssh problem. You may get some ideas from looking at the scripts that HP provides.
Regards,
Tom
For ssh I suggest you consider running HP's version of it. It is avalable from a link at
http://www.hp.com/products1/unix/operating/security/index.html#network
Be sure to get the Strong Random Number Generator also from a link on that page.
Here's the direct link for ssh
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA
The HP depot for ssh will install init scripts.
I realize this won't answer your question regarding init scirpts, but it will address your ssh problem. You may get some ideas from looking at the scripts that HP provides.
Regards,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 12:49 PM
05-27-2004 12:49 PM
Re: init script problem during bootup
The first p-lace to start is /etc/rc.log which is the log for all startup scripts. Even if you miss any error messages during bootup, they will be found in rc.log. nohup isn't necessary since sshd is a correctly written daemon (it moves itself out of the current session and assigns itself to init). The easiest way to see if sshd is actually started is to add this to the beginning of the script:
set -x
All the debug details will be in /etc/rc.log (and the shutdown steps are appended to rc.log and written to rc.log.old)
Bill Hassell, sysadmin
set -x
All the debug details will be in /etc/rc.log (and the shutdown steps are appended to rc.log and written to rc.log.old)
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP