- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- run script during server shutdown?
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
10-18-2006 02:59 AM
10-18-2006 02:59 AM
I want the "shutdown -ry now" command to run an Oracle shutdown script automatically before continuing to shutdown the rest of the HP-UX Operating system.
If I were to create an "/sbin/rc3.d/K001oracle" file and have it symbolically linked to "/usr/local/bin/stop_oracle.sh" script, would this work to shutdown Oracle properly and then continue to shutdown the HP-UX OS and reboot the server?
PS: My Oracle DBA wrote the "/usr/local/bin/stop_oracle.sh" script and we know this works fine by itself.
Likewise, if I put in an "/sbin/rc4.d/S001oracle" script linked to "/usr/local/bin/start_oracle", would this start Oracle when the server boots up?
Any information, tips, etc. would be great to this newbie UX Admin. thanks...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2006 03:02 AM
10-18-2006 03:02 AM
SolutionThe manpages for 'rc(1M)' or the original 10x document below offer everything you should know:
http://docs.hp.com/en/B2355-60127/rc.1M.html
http://docs.hp.com/en/934/startup.pdf
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2006 03:15 AM
10-18-2006 03:15 AM
Re: run script during server shutdown?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2006 03:22 AM
10-18-2006 03:22 AM
Re: run script during server shutdown?
One more note - the links you are using start oeacle at run level 4 and stop it at run level 3. This is fine if you are bring the system up to run level 4 or 5, but a lot of systems are only brought up to run level 3, which means your oracle will never start.
Check your default run level in the /etc/initab file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2006 03:37 AM
10-18-2006 03:37 AM
Re: run script during server shutdown?
Likewise, when shutting down, you go FROM run level 3 TO run level 2, so your Kxxxscript would go in /sbin/rc2.d
As already mentioned there are some good readme's on how to do this available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 06:54 AM
10-19-2006 06:54 AM
Re: run script during server shutdown?
All of the existing files in the "/sbin/rc3.d" directory have "lrwxr-xr-x" permissions. When I type the command:
"ln -s /home/oracle/startall.sh /sbin/rc3.d/S999oracle"
the "S999oracle" file gets "lrwx------" permissions.
I type "chmod 766 S999oracle" and it doesn't change the permissions.
I "chmod 766 /home/oracle/startall.sh" file and re-created the link and it still doesn't let me change from 700 to 766. I even tried fooling around with the owner and groups. Nothing will let me change the permissions to 766 on the link in "/sbin/rc3.d".
Oh what shall I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 06:58 AM
10-19-2006 06:58 AM
Re: run script during server shutdown?
The permissions and/or ownership of a symbolic link are meaningless. The permissions and ownership of the file (or directory) to which the symbolic link points are all that matter!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 06:58 AM
10-19-2006 06:58 AM
Re: run script during server shutdown?
Besides, permission on a link are somewhat meaningless as the permissions on the file you link to will be honored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 07:13 AM
10-19-2006 07:13 AM
Re: run script during server shutdown?
these forums rock!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2006 12:26 AM
10-23-2006 12:26 AM