- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- scripts starting at boot time
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
08-20-2002 06:14 PM
08-20-2002 06:14 PM
scripts starting at boot time
When I run the script manually, it runs fine. I can stop and start my daemon at will, running the process in the background (with &).
But when I reboot, it does not start. Yes, I get the "start_mesg" and "stop_mesg" but my log file doesn't update, and when I grep out the process (httpd) it's not started.
I'm going crazy! Any one have any ideas?????
- Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 06:24 PM
08-20-2002 06:24 PM
Re: scripts starting at boot time
Also, check /etc/rc.log to look for any output messages for your http startup script. You can locate the relating lines within the file quicker by searching against your startup script name (S020apache for my example above).
Rgds,
Philip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 06:27 PM
08-20-2002 06:27 PM
Re: scripts starting at boot time
Is there some special way needed to launch my script other than with "&".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 06:32 PM
08-20-2002 06:32 PM
Re: scripts starting at boot time
As you are getting the start and stop messages, I believe that the script is getting executed properly during the startup. I would suggest you to keep the debug line "set -x" at the beginning of the script and observe the output. Your console may clobber a bit but it will help you troubleshoot the problem.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 06:39 PM
08-20-2002 06:39 PM
Re: scripts starting at boot time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 01:31 AM
08-21-2002 01:31 AM
Re: scripts starting at boot time
exec 2>&1
set -x
The "exec 2>&1" will cause all standard error output to go to where standard outpui is going, which is to /etc.rc.log.
The "set -x" will log each executed command, so that when you see an err in (/etc/rc.log) you will know which command gave that error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 03:51 AM
08-21-2002 03:51 AM
Re: scripts starting at boot time
Can you actually see the following lines for your process in /etc/rc.log?
Starting
Output from "/sbin/rc3.d/Sxx
... ba-ba-ba ...
If these lines weren't there that mean they weren't even executed.
What about run level, was it set to 3 in /etc/inittab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 04:46 AM
08-21-2002 04:46 AM
Re: scripts starting at boot time
i.e. top line may need to be added or altered to be
#!/sbin/sh or whatever shell you are running in (do an echo $SHELL) of the user that successfully runs the script, and then set that within the script.
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 05:01 AM
08-21-2002 05:01 AM
Re: scripts starting at boot time
I got it!
Problem was this:
1. I needed to use "nohup" to launch my script.
2. I had to add /usr/bin to the PATH variable inside the script. This path was not picked up yet where I launched the script, so the shell couldn't find "nohup". (I put my script right before CDE started in rc3.d. So I was surprised by this.)
Thanks for all your help! It gave me clues. I hope this helps someone else out there.
- Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 05:38 AM
08-21-2002 05:38 AM
Re: scripts starting at boot time
Your 02:27 AM GMT response correctly says "[ N/A: Question Author ]", but your 13:01 PM GMT response says "[ unassigned ]" which implies that you are not the Question Author, but obviously you are.
One account is of ("ITRC member since:") August 21, 2002, the other is of August 05, 2002.
I advise to delete one of these accounts because two accounts with the same user name is confusing.