- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Startup location
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
06-07-2004 06:42 PM
06-07-2004 06:42 PM
I made a script and planning to launch it when the system boot. Do I put the script in /sbin/init.d?
Do I need to edit somewhere?
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:52 PM
06-07-2004 06:52 PM
Re: Startup location
In /sbin/init.d you just place the startup or shutdown script , but you must tell the system how and when to use it .
You will tell the system to start the script in a certain execution level . This is defined in the /sbin/rcX.d . X means the execution level in which the script will be executed
In this directories you will create a file for the startup , SXXX..... , and a file for the shutdown KXX.... XXX means the order in which the scripts will be executed inside the execution level.
There are a lot of examples in this directories
XXX means the orede
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:53 PM
06-07-2004 06:53 PM
SolutionRefer the following Links:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=480208
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=450287
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=351809
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:54 PM
06-07-2004 06:54 PM
Re: Startup location
read this post:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=106875
besides /sbin/init.d where the script r kept, u need to do a soft link to /sbin/rc#.d as well.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:56 PM
06-07-2004 06:56 PM
Re: Startup location
Adding a program to start automatically at run time requires that the program be put in /sbin/init.d directory.
the execution scripts contains four major parts which are passed as command line arguments to these scripts.
start_msg displayed on the console when starting
stop_msg displayed on the console when stopping
start command to start the program
stop command to stop the program
and these are put in the configuration for each respective script at /etc/rc.config.d directory
next you need to decide at which run level you are going to start the script, say you are planning to start the script at run level 2. a link file has to be placed in /sbin/rc2.d directory.
ln -s /sbin/init.d/script /sbin/rc2.d/S900script
with best wishes
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:00 PM
06-07-2004 07:00 PM
Re: Startup location
One more Q.
It seems like in /sbin/rcX.d are bunch of links. Is that mean that I don't have to put my script in /sbin/init.d?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:06 PM
06-07-2004 07:06 PM
Re: Startup location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:07 PM
06-07-2004 07:07 PM
Re: Startup location
You must put your script in /sbin/init.d and create the link to /sbin/rcX.d directory.
regards,
RDL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:09 PM
06-07-2004 07:09 PM
Re: Startup location
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 01:06 AM
06-08-2004 01:06 AM
Re: Startup location
this is an example for what we do typically for Oracle Database startup:
Relevant Files:
===============
a. /sbin/init.d/oracle
contains the main script for doing db startup and shutdown owned by root
b. /etc/rc.config.d/oracle
this file enables/disables automatic startup and shutdown of the databases owned by root
c. /sbin/rc1.d/K100oracle ->/sbin/init.d/oracle
this link tells the system when to execute the Oracle script with the 'stop' command in single user mode during system shutdown
d. /sbin/rc2.d/S990oracle ->/sbin/init.d/oracle
this link tells the system when to execute the Oracle script with the 'start' command in multi-user mode during system startup
Steps:
======
1. Create an executable script /sbin/init.d/oracle for the startup and shutdown of Oracle
Your script should attempt to start the database with the following command:
su -
Your script should attempt to shut the database with the following command:
su -
Make sure that the script is owned and executable only by the super user.
2. Create the file /etc/rc.config.d/oracle
This file should contain:
ORACLE_START=1
export ORACLE_START
3. Edit /etc/oratab
ORACLE_SID:ORACLE_HOME:Y|N
where Y or N indicates whether you want the dbstart and dbshut scripts to be run
4. Make /sbin/rc1.d/K100oracle a symbolic link to /sbin/init.d/oracle
5. Make /sbin/rc2.d/S990oracle a symbolic link to /sbin/init.d/oracle
hope this helps!
regards
Yogeeraj