Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-10-2003, 02:50 AM
|
#1
|
LQ Newbie
Registered: Jul 2003
Posts: 10
Rep:
|
Where is system's startup script directory
Hi,
Can help me where is Linux RH system's startup script directory? thanks.
|
|
|
07-10-2003, 03:05 AM
|
#2
|
Member
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261
Rep:
|
I forgot but I would suggest searching for /etc/rc.sysinit
Others will come up with this.
Qu Chen
|
|
|
07-10-2003, 11:33 AM
|
#3
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
It depends on the version I believe. But if you poke around in /etc/ and look for rc anything, those are usually your startup scripts
/etc/rc.d/ is a possibility.
Cool
|
|
|
07-11-2003, 12:18 AM
|
#4
|
LQ Newbie
Registered: Jul 2003
Posts: 10
Original Poster
Rep:
|
Hi, Thanks for your help.
can i just create a file called "Test". This file contain some script such as:
#samba startup deamon
case "$1" in
if [ -f /usr/local/samba/bin/smbd -a -f /usr/local/samba/lib/smb.conf]; then
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
;;
echo "Usage: $0 start"
exit 1
;;
will it works if i save it in /etc/rc.d ? or i have to insert the above script in rc.sysinit?
thanks.
Any help man to understand startup directory?
|
|
|
07-11-2003, 12:30 AM
|
#5
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Not that I am aware of (the man page to help understand startup dir) however you might find some discussion on sysVinit around the board and on google.com/linux
As for "create file Test with code" and just place it in that directory, not likely. You probably have runlevel directories though (rc.3 or rc3.d) that correspond to your current runlevel (to find out check /etc/inittab and look for id:3:default or something similar, might be 5) and you could do what you are wanting there. Make sure it's executable though.
What I'd suggest is finding an rc.local file and using that instead. Almost every distro I've used has one, run a search:
find / rc.local
OR
locate rc.local
Inside there you can do what you are wanting, this file is exactly for what you are looking to do.
Cool
|
|
|
All times are GMT -5. The time now is 02:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|