HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Running script at the boot time of server
Operating System - HP-UX
1832203
Members
2526
Online
110039
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
01-05-2001 08:41 PM
01-05-2001 08:41 PM
Running script at the boot time of server
Hi,
We have HP K/360/2 server. I want to run some of my shell scripts immediately after the server starts.
How can I do this?
Pl. assist.
Thanks.
We have HP K/360/2 server. I want to run some of my shell scripts immediately after the server starts.
How can I do this?
Pl. assist.
Thanks.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2001 09:41 PM
01-05-2001 09:41 PM
Re: Running script at the boot time of server
Hi,
I know you need to put them in the appropriate rc{1-5}.d directory. Maybe this link will help
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe8f0f841489fd4118fef0090279cd0f9,00.html
HTH,
Mo
I know you need to put them in the appropriate rc{1-5}.d directory. Maybe this link will help
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe8f0f841489fd4118fef0090279cd0f9,00.html
HTH,
Mo
No matter where you go, there you are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2001 07:09 AM
01-06-2001 07:09 AM
Re: Running script at the boot time of server
Hi Samir,
At boot time, all scripts residing starting with the letter S (for start) located in directories /sbin/rc?.d are run in alphabetical order.
The last directory from which scripts will be run depends on your init level.(for example /sbin/rc3.d for init level 3)
The default boot level will have an entry called 'initdefault' in file /etc/inittab (normally 3)
All files in /sbin/rc?.d are symbolic links to files in /sbin/init.d. Those files have more meaningful names.
To control the execution of those scripts, they source files with some variable definitions located in /etc/rc.config.d
All the scripts in /sbin/init.d have a start and a stop entry, meaning that depending the argument given, the same script can be used a system startup or shutdown.
The shutdown scripts are run in the same way as the startup scripts, in reverse alphabetic order. They have a name staring with a K (for kill).
An example:
starting nfs_client will be done with file S430nfs_client located in /etc/rc2.d
This means that nfs_client will be enabled at init level 2 (rc2.d).
When shutting down, going from level x down to 0, the nfs_client will be stopped when script /sbin/rc1.d/K570nfs_client. This one is executed when leaving level 2, that's why it is located in rc1.d.
When nfs_client is started, the file /etc/rc.config.d/nfsconf is sourced and some variables are defined.
If you want to add scripts starting automatically during system boot, you could simply follow the same principle:
one file in /sbin/init.d
2 files (one for startup, one for shutdown) in the /etc/rc?.d directories, starting with S and K (symbolic links to the file in /sbin/init.d)
one file in /etc/rc.config.d with some variables defined (this one isn't mandatory)
You simply need to define when your script is run, and make sure all necessary resources are available, for example, don't rely on /usr/bin/csh if the /usr filesystem isn't mounted yet or dont try accessing the network if it's not up and running.
Hoping this was clear enough,
Best regards,
Dan
At boot time, all scripts residing starting with the letter S (for start) located in directories /sbin/rc?.d are run in alphabetical order.
The last directory from which scripts will be run depends on your init level.(for example /sbin/rc3.d for init level 3)
The default boot level will have an entry called 'initdefault' in file /etc/inittab (normally 3)
All files in /sbin/rc?.d are symbolic links to files in /sbin/init.d. Those files have more meaningful names.
To control the execution of those scripts, they source files with some variable definitions located in /etc/rc.config.d
All the scripts in /sbin/init.d have a start and a stop entry, meaning that depending the argument given, the same script can be used a system startup or shutdown.
The shutdown scripts are run in the same way as the startup scripts, in reverse alphabetic order. They have a name staring with a K (for kill).
An example:
starting nfs_client will be done with file S430nfs_client located in /etc/rc2.d
This means that nfs_client will be enabled at init level 2 (rc2.d).
When shutting down, going from level x down to 0, the nfs_client will be stopped when script /sbin/rc1.d/K570nfs_client. This one is executed when leaving level 2, that's why it is located in rc1.d.
When nfs_client is started, the file /etc/rc.config.d/nfsconf is sourced and some variables are defined.
If you want to add scripts starting automatically during system boot, you could simply follow the same principle:
one file in /sbin/init.d
2 files (one for startup, one for shutdown) in the /etc/rc?.d directories, starting with S and K (symbolic links to the file in /sbin/init.d)
one file in /etc/rc.config.d with some variables defined (this one isn't mandatory)
You simply need to define when your script is run, and make sure all necessary resources are available, for example, don't rely on /usr/bin/csh if the /usr filesystem isn't mounted yet or dont try accessing the network if it's not up and running.
Hoping this was clear enough,
Best regards,
Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP