- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- run script when system root
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
11-25-2003 08:19 PM
11-25-2003 08:19 PM
run script when system root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 08:26 PM
11-25-2003 08:26 PM
Re: run script when system root
Basically it requires that you copy the script into /sbin/init.d, and then put a symbolic link to a file in /etc/rc2.d or /etc/rc3.d (depending on which run level you want your script to run at).
NB scripts put here are expected to adhere to certain conventions, there is a template (/sbin/init.d/template) - copy it and follow the instructions inside.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 08:27 PM
11-25-2003 08:27 PM
Re: run script when system root
this is what the scripts in /sbin/init.d do
for each there should be a link in /sbin/rcX.d (where X is the run level) named S###_scriptname like /sbin/rc1.d/S500swap_start -> /sbin/init.d/swap_start
for startup
or /sbin/rcX.d/K###myscript -> /sbin/init.d/myscript
for shutdown
Note that you need to include a PATH in those scripts or enter executables with full path.
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 08:32 PM
11-25-2003 08:32 PM
Re: run script when system root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 08:35 PM
11-25-2003 08:35 PM
Re: run script when system root
#init
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 08:39 PM
11-25-2003 08:39 PM
Re: run script when system root
To change the default, modify /etc/inittab, line beginning init, eg
init:3:initdefault:
see man inittab, and be careful!
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2003 09:00 PM
11-25-2003 09:00 PM
Re: run script when system root
i use run level 3 in my HP UX 11 , i only found the files ( S100nfs.server , S200tps.rc , S990dtlogin.rc ) in the path /sbin/rc3.d , do u mean create a file such as db_start in this path , and add the script to this file ? thx.