- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- customized startup scripts in /sbin/init.d
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
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
07-11-2002 11:14 AM
07-11-2002 11:14 AM
I'm trying to add a customized startup script in the /sbin/init.d directory to start our application(broadvision) automatically at boot time. I'm creating the start link at rc3.d and kill link at rc2.d
I run the script in command line, it works fine, but the problem is, when it invoked at bootup time, some background process cannot be started, . my question is, is there any difference between runing a script from init at boot time and from normal shell command line?
thanks,
Gary
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:16 AM
07-11-2002 11:16 AM
Re: customized startup scripts in /sbin/init.d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:18 AM
07-11-2002 11:18 AM
Re: customized startup scripts in /sbin/init.d
Yes, the environmental variables are probably quite different. Remember, any variables sourced and exported by your profile during login are absent. Make sure that your 'rc' script has at least a PATH variable set and that you declare any other environment you need.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:19 AM
07-11-2002 11:19 AM
Re: customized startup scripts in /sbin/init.d
One difference is enviroment variables such as PATH is set in your login session but not automatic at booting. Check your script which variables needs to be set (and dont forget to export).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:19 AM
07-11-2002 11:19 AM
Re: customized startup scripts in /sbin/init.d
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:23 AM
07-11-2002 11:23 AM
Re: customized startup scripts in /sbin/init.d
Go thro this link.....
http://docs.hp.com/hpux/onlinedocs/os/startup.pdf
Have you created something in the /etc/rc.config.d also ???
Also post your scripts and check whether the PATH is correct. Put the full path of the command like /usr/bin/ls instead of just ls
Piyush
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:25 AM
07-11-2002 11:25 AM
Re: customized startup scripts in /sbin/init.d
As Rich has noted you have a very sparse environment because there's no login - you must explicilty setup any env parms OR use su - username - c "command string" commands.
Also exactly *how* you name the links in rc3.d/rc2.d can play a part. If you name them LOWER than another script that this script is dependent on - you've got a problem. So when in doubt, name it high enough so that you know everything else you might need is already running.
And you probably know but the Sxxxfilename & Kxxxfilename numbers in rc3.d/rc2.d should equal 1000. NOT required, but good practice.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:37 AM
07-11-2002 11:37 AM
Re: customized startup scripts in /sbin/init.d
thanks,
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 04:35 AM
07-12-2002 04:35 AM
Solution> seemed all process are started(there's one
> line output for each process started) but
> when I logged in and checkeed, some of them
> doesn't show up ...
If the processes are not designed as daemons, you have to start them with nohup(1) *and* allow for some time after each nohup command for nohup to do its work, i.e.
nohup real_command &
sleep 1
The sleep is really a hack, because you should really *check* if real_command has actually started.
You will probably also need to redirect standard in or/and standard out or/and standard error.
Gary