- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Executing Script While System 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
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
07-12-2006 04:07 PM
07-12-2006 04:07 PM
Give me the steps that I need to do...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2006 04:21 PM
07-12-2006 04:21 PM
Re: Executing Script While System Booting...
1. create a new start and stop script in /sbin/init.d/ and you could use the script /sbin/init.d/template as the template.
2. create a softlink in /sbin/rc3.d
# ln -s /sbin/init.d/[your script] /sbin/rc3.d/S***[your script]
3. create a softlink in /sbin/rc2.d
# ln -s /sbin/init.d/[your script] /sbin/rc2.d/K***[your script]
you may also create a startup configure file in /etc/rc.config.d/
GOOD LUCK!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2006 04:33 PM
07-12-2006 04:33 PM
Re: Executing Script While System Booting...
you need to create links in the /sbin/rc3.d for the startup execution at runlevel3 and /sbin/rc2.d for the kill execution at runlevel 2
example:
say the scripts are /usr/local/bin/script2start
and
/usr/local/bin/script2stop
make sure it has the standard start/stop format see attachment example
place this startstopscript in the /sbin/init.d directory make sure the execuable permissions are correct
cd to /sbin/rc3.d and create the link
ln -s /sbin/init.d/startstopscript S901startstopscript
this will create a link for the starup
now for the shutdown cd to /sbin/rc2.d and create another link
ln -s /sbin/init.d/startstopscript K99startstopscript
this will create the kill or the stop link
This should do it
thanks
DP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2006 05:14 PM
07-12-2006 05:14 PM
Re: Executing Script While System Booting...
From Your Guidelines...Here I Created the steps
Suggest Me whether it is Right...
The Script to Start is /sbin/init.d/Start
_Backup
The Script to Stop is /sbin/init.d/Stop_Backup
Permissions Are Fine....
ln -s /sbin/init.d/Start_Backup
/sbin/rc3.d/S756Backup
ln -s /sbin/init.d/Stop_Backup /sbin/rc2.d/K982Backup
Here I attached the Script as given by DP...
But Where I need to Copy this File in /sbin/init.d or in /etc/rc.config.d directory..
Whether this file is Enough for Starting & Killing or I need to Creare One more file for Killing ....
Pls Clarify......
---------------------------------------------
If Not So Clear:-
THE SCRIPT /SBIN/INIT.D/BACKUP
I WANT TO START IN RUNLEVEL 3 & KILL AT LEVEL 2.
PROVIDE ME THE FILE THAT WILL DO THIS ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2006 11:53 AM
07-13-2006 11:53 AM
Re: Executing Script While System Booting...
you are fine there all you need to do is to check the permissions on the script /sbin/init.d/backup
remove the links you created earlier
by doing
cd /sbin/rc3.d
rm S756Backup
and
cd /sbin/rc2.d
rm K982Backup
recreate the links as follows
ln -s /sbin/init.d/backup
/sbin/rc3.d/S756Backup
ln -s /sbin/init.d/backup /sbin/rc2.d/K982Backup
Just a note:
The numbers ( S756 and K982) although you can use whatever you want but the recommended way is to substract the start number from 1000 and use it for the kill script. So if possible use S756 and K244
thanks
DP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2006 11:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2006 05:48 PM
07-13-2006 05:48 PM