- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: read boot script
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-22-2002 06:52 AM
тАО08-22-2002 06:52 AM
read boot script
another small problem.
I have a script that i want to be read while system is booting. I will attach it.
What i'm doing is to put that script under /etc/init.d and then create a link from /etc/rc.d/rc2.d with name S99setKrnlPar that points to the script under /etc/init.d.
Unfortunately this script after boot isn't read.
What i'm missing?
Thanks
Tarek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 08:38 AM
тАО08-22-2002 08:38 AM
Re: read boot script
/etc/init.d/setKrnlPar start
Are you running in runlevel 2 by default?
grep initdefault /etc/inittab
id:2:initdefault:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 09:04 AM
тАО08-22-2002 09:04 AM
Re: read boot script
If you want to create RedHat style boot script, you must add following lines, then you will be able to use chkconfig.
# chkconfig : 235 10 90
# description: description of this script
235 is runlevel that the script starts.
10 90 is a priority that the script run & stop.
For the detail, man chkconfig will help you.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 10:58 PM
тАО08-22-2002 10:58 PM
Re: read boot script
I can run the script manually /etc/init.d/setKrnlpar and it works.
Now i will try with chconfig and let you know.
Thanks again
Tarek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2002 03:10 AM
тАО11-13-2002 03:10 AM
Re: read boot script
# chkconfig : 235 10 90
# description: setKrnlPar
Then:
chkconfig --add setKrnlPar
service setKrnlPar does not support chkconfig
But if i issue:
chkconfig setKrnlPar start the script is read
However at boot time no. I don't want that this script should be a service (also because start & stop doesn't have sense here, they aren't used).
I only want that at boot time, this file is read and executed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2002 08:37 AM
тАО11-13-2002 08:37 AM
Re: read boot script
The script should be executable.
The first line should be indicate the shell to run.
Try '#!/bin/sh -x' to get a debug trace.
Don't count on much of a path or environment.
If you are strarting in run level 3, link in rc3.d not rc2.d. Linux tends not to walk the rc*.d tree during startup. Likely ony rc3.d is being run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2002 10:23 AM
тАО11-13-2002 10:23 AM
Re: read boot script
Unless you want it to start up at a certain point in the boot process, why wouldn't you just execute the script from /etc/rc.d/rc.local that is run last at boot I believe.
Just a thought. Hope it helps.
Jeff