Linux - NewbieThis 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.
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.