- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- start a script at boot
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
12-11-2001 02:45 AM
12-11-2001 02:45 AM
start a script at boot
argument when an hpux boot .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:51 AM
12-11-2001 02:51 AM
Re: start a script at boot
Check the scripts in /sbin/rc2.d or /sbin/rc3.d
Look at these scripts. Setup your script the same way. Place it in /sbin/rc3.d and it should work.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:52 AM
12-11-2001 02:52 AM
Re: start a script at boot
The /sbin/rc script *expects* you to use the start/stop arguments. Have you any more details/reasons for this request?
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:54 AM
12-11-2001 02:54 AM
Re: start a script at boot
If those parameters are in the way, make a small start/stop script in /sbin/init.d that sources or executes your script without parameters if it is started with the "start" parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:55 AM
12-11-2001 02:55 AM
Re: start a script at boot
The stub procedure goes like this:
=============================
#!/sbin/sh
case $1 in
start) # enter startup command here ;;
stop) # enter shutdown command here, optional ;;
start_msg) # enter startup message here, optional ;;
stop_msg) # enter shutdown message here, optional ;;
esac
=============================
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:55 AM
12-11-2001 02:55 AM
Re: start a script at boot
eg. sap_ctrl script (for starting sap) calls the 'start_sap' command as p01adm in the 'start' conditional.
The script does have to work within the guidelines and standards set by HP-UX.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 02:56 AM
12-11-2001 02:56 AM
Re: start a script at boot
Usualy to start process on boot :
Create your script on /sbin/init.d
Create a link from this scrip to /sbin/rcx.d (where x indicate the start level) called SXXXyourscript.
Fr??d??ric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 03:02 AM
12-11-2001 03:02 AM
Re: start a script at boot
If you just want to run a script at startup and shutdown you can place your script in /sbin/init.d, create soft links in /sbin/rc3.d for startup and soft link in /sbin/rc2.d for shutdown and the configuration file, if your want to run it occasionally in /etc/rc.config.d
Let it do what you want to do ignoring the start and stop argument. But I think you need to handle the startmsg and stopmsg arguments.
...BPK...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 06:04 AM
12-11-2001 06:04 AM
Re: start a script at boot
As others say, the appropriate method for starting processes at boot time is the RC scripts. As long as your script's name begins with a capital S the script will be executed by /sbin/rc when it executes scripts for that run level. You don't have to use the case statement with start, stop, etc but it is highly recommended.
As an alternative, you could use /etc/inittab. This is not the generally accepted method and I suggest you avoid it. Mess up inittab and you've got trouble.
My advice is to stick with the RC scripts. It is the standard, there are templates (just use any system supplied rc script as a guide), and logging is provided (/etc/rc.log).
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:13 AM
12-11-2001 08:13 AM