- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Run script when system reboot
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
Discussions
Discussions
Forums
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
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
тАО08-15-2003 01:04 AM
тАО08-15-2003 01:04 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2003 01:10 AM
тАО08-15-2003 01:10 AM
Re: Run script when system reboot
In Rh9.0 there's a gui tool called redhat-config-services, see if you have that.
All the service stubs are located in /etc/rc.d/init.d.
Good luck,
Cristi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2003 01:36 AM
тАО08-15-2003 01:36 AM
Re: Run script when system reboot
how about /etc/inittab ? is it also run the script in the file when reboot ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2003 02:56 AM
тАО08-15-2003 02:56 AM
Re: Run script when system reboot
use /etc/rc.local
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2003 03:44 AM
тАО08-15-2003 03:44 AM
SolutionYou can use inittab to configure the runlevel in which your system runs (e.g. 5 for graphical, 3 for non-graphical).
See 'man inittab' for the complete description.
HTH
Cristi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2003 10:06 PM
тАО08-15-2003 10:06 PM
Re: Run script when system reboot
like during boot ... before some services are started ... or after in short do you require that some of the enviroment be there or not ?
what you want to execute pretty much determine what file you should modify.
Jean-Pierre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2003 07:50 PM
тАО08-17-2003 07:50 PM
Re: Run script when system reboot
Linux
/etc/init.d
The location of all startup scripts
/etc/rc#.d
There are usually 6 of these numbered zero through five, assumming your system(prior posts) is a run level 5 system.
What you do to get things to run at startup is place softlinks in these directories pointing at scripts in /etc/init.d
Example
I have a script that starts the bagel service.
/etc/init.d/bagel
This script follows a standard format requiring start or a stop or a restart as the first command line parameter.
To get it to start at run level five:
ln -s /etc/init.d/bagel /etc/rc5.d/S85bagel
the capital S is critical, everthing else is documentation
If you start it you want to stop it usually one run level below where you start it.
ln -s /etc/init.d/bagel /etc/rc4.d/K85bagel
S for start
K for kill
all you need now is some real scripts to run.
Be careful what you run, you system will not be fully operational until its done.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com