- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Registering to startup application on boot or rebo...
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
05-17-2007 01:34 PM
05-17-2007 01:34 PM
Registering to startup application on boot or reboot
Is there a way to register for an application to startup upon boot or reboot?
For solaris, it would be registering it at /etc/rc0.d and /etc/rc3.d.
Is there something similar in HP-UX?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 01:44 PM
05-17-2007 01:44 PM
Re: Registering to startup application on boot or reboot
Yes, the 'rc' paradigm applies to HP-UX.
This whitepaper describes everything you need to follow and do. Althouth it first appeared for HP-UX 10.0 it is applicable to all current releases.
http://docs.hp.com/en/934/startup.pdf
You can also consult the manpages for 'rc(1M)':
http://docs.hp.com/en/B2355-60105/rc.1M.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 01:46 PM
05-17-2007 01:46 PM
Re: Registering to startup application on boot or reboot
Wrinkle 1) The master scripts are installed in /sbin/init.d. The symbolic links then link from /sbin/rcN.d to the "real" file in /sbin/init.d.
Wrinkle 2) Rather than having the normal "start" and "stop" command line arguments. HP-UX augments them with "start_msg" and "stop_msg".
Wrinkle 3) By convention, environment variables needed by your scripts are sourced from /etc/rc.config.d.
If you will look in /sbin/init.d there is a template script that you can copy and adapt to your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 02:05 PM
05-17-2007 02:05 PM
Re: Registering to startup application on boot or reboot
Thanks for the info. I will try it out and feedback on the results.
Have modified the template and linked it to rc0.d and rc3.d.
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 07:20 PM
05-17-2007 07:20 PM
Re: Registering to startup application on boot or reboot
Wrinkle 4) Unlike some other unixes and unix-like systems, when HP-UX moves from one runlevel to another, it will also execute the start/stop scripts for the intervening runlevels.
In other words, when going from runlevel 3 to runlevel 0, the "stop" scripts associated with runlevels 2 and 1 are executed _in addition to_ anything defined specifically for runlevel 0. When going from single-user mode to runlevel 3, the "start" scripts of runlevel 2 are executed too.
So the correct place for "start" link is /sbin/rc3.d, just like /etc/rc3.d in most other unixes, but the "stop" link might be different. The normal place for it would be /sbin/rc2.d.
If you put it to /sbin/rc0.d, the application will be stopped _very_ late in the shutdown sequence: when the scripts in HP-UX /sbin/rc0.d are executed, some rather basic things like NFS and even syslogd have already been shut down. If your application uses these services, it may be unable to shutdown cleanly.
A side effect of putting the application stop link in /sbin/rc2.d is that the application will be stopped whenever you go to the single user mode. Normally this is what you want: if you need the single-user mode, you will be doing some major maintenance and want the system to be as clean as possible.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 07:28 PM
05-17-2007 07:28 PM
Re: Registering to startup application on boot or reboot
Actually what i need is to have a auto start/stop for vnc services upon booting and shutting down of server.
so, the best place to put is in rc2.d and rc3.d?
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 07:53 PM
05-17-2007 07:53 PM
Re: Registering to startup application on boot or reboot
i have tried, but when i perform a reboot, it does not start.
what i have done is modify the template and create a link to it at rc0.d,rc2.d,rc3.d.
the vnc services still did not start.
any idea what went wrong?
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 08:08 PM
05-17-2007 08:08 PM
Re: Registering to startup application on boot or reboot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 11:30 PM
05-17-2007 11:30 PM
Re: Registering to startup application on boot or reboot
No, you provide a start link only at the level you want it to start and the name of the link is the alphabetic sequence where you want it to start after other services. The stop link would typically be one level lower than the start script and would be named in sequence to run in front of other system shutdown services. The output from all start/stop scripts is found in /etc/rc.log and /etc/rc.log.old where you can see any error messages.
Always test your script manually:
/sbin/init.d/myscript stop
/sbin/init.d/myscript start
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2007 11:43 PM
05-17-2007 11:43 PM
Re: Registering to startup application on boot or reboot
old but gold.
The attached document should clarify all your doubts.
HP-UX 10.X Startup and Configuration
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2007 12:56 AM
05-18-2007 12:56 AM
Re: Registering to startup application on boot or reboot
su - oracle -c "/usr/local/vnc/vncserver :13" &
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2007 07:24 PM
05-21-2007 07:24 PM
Re: Registering to startup application on boot or reboot
However, when it starts up, the screen will load normally and show the desktop. After a while, the whole screen will turn grey and i am unable to do anything.
This can be rectified by stopping and restarting the vnc server again manually but i think this should not be the case.
any suggestions??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2007 02:20 PM
05-29-2007 02:20 PM
Re: Registering to startup application on boot or reboot
The screen is still grey after i reboot and i am not sure why this is happening.
When i manually run the vnc script (which is used at reboot), it will work fine. But i need it to work at reboot or cold start.
Please kindly advise..
Thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2007 11:49 PM
06-03-2007 11:49 PM
Re: Registering to startup application on boot or reboot
Have managed to solve the problem.