- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script/command execution at booting
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
Discussions
Discussions
Forums
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
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
тАО03-03-2009 02:52 AM
тАО03-03-2009 02:52 AM
script/command execution at booting
In which file i can put the command/script in HP-UX ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 03:00 AM
тАО03-03-2009 03:00 AM
Re: script/command execution at booting
http://www.docs.hp.com/en/934/startup.pdf
unchanged since hp-ux 10.x
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 03:55 AM
тАО03-03-2009 03:55 AM
Re: script/command execution at booting
Copy your script to /sbin/init.d/ directory and set execute permission. Then create symbolic link in the appropriate run level RC directory to this script. For eg. the script name is "myscript.sh" and I want that to run on run level 3. Then I would do the following.
#cp myscript.sh /sbin/init.d
#chmod 755 /sbin/init.d/myscript.sh
#cd /sbin/rc3.d
#ln -s /sbin/init.d/myscript.sh S101myscript.sh (the number 101 is the sequence number, you can change it any number).
#cd /sbin/r2.d
#ln -s /sbin/init.d/myscript.sh K899myscript.sh (the number 899 is the sequence number, you can change it to any number).
remember to test your script before adding to these directories, else your system may not boot correctly.
Good luck
Shahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 04:24 AM
тАО03-03-2009 04:24 AM
Re: script/command execution at booting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 04:35 AM
тАО03-03-2009 04:35 AM
Re: script/command execution at booting
The whitepaper Torsten cited is probably the best discussion. You can also see a virtual summary in the manpages for 'rc(1M)'. You will note from those manpages that a return code of <4> and greater is defined. This was not described in the original paper.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:00 AM
тАО03-03-2009 07:00 AM
Re: script/command execution at booting
1. You can prepare a file under /etc/rc.config.d/ to switch on and off the start up scripts.
2. The K and S number should have the sum of 1000. So if the start up file is S911 then the shutdown number should be K089.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 08:57 AM
тАО03-03-2009 08:57 AM
Re: script/command execution at booting
don't use or don't start application which are using socket/netstat before
/sbin/rc2.d/S008net.init