LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-10-2003, 02:50 AM   #1
william43
LQ Newbie
 
Registered: Jul 2003
Posts: 10

Rep: Reputation: 0
Where is system's startup script directory


Hi,
Can help me where is Linux RH system's startup script directory? thanks.
 
Old 07-10-2003, 03:05 AM   #2
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
I forgot but I would suggest searching for /etc/rc.sysinit

Others will come up with this.

Qu Chen
 
Old 07-10-2003, 11:33 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 07-11-2003, 12:18 AM   #4
william43
LQ Newbie
 
Registered: Jul 2003
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
Old 07-11-2003, 12:30 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 06:54 PM
startup script c0c0deuz Linux - Newbie 3 03-29-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration