Slackware This Forum is for the discussion of Slackware Linux.
|
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.
|
|
09-05-2006, 11:27 AM
|
#1
|
Member
Registered: Aug 2006
Posts: 72
Rep:
|
How to use the BSD style init scripts in /etc/rc.d
Hi,
I have recently changed over to using Slack for much of my linux boxes.
I've used RH and SUSE for a while, and can find my way in and out. Slack though, it's just the real specifics that I'm having problems with.
Currently, I'm tyring to figure out how to use the BSD style init scripts in the /etc/rc.d directory.
I'm trying to start some services on my system like ProFTPD, Samba, etc...
I know in RH and SUSE, you'd just go to /etc/init.d, then type like smbd start (or whatever it is). But because that is a System V style init script that has symlinks linked to scripts in the /etc/rc.d/rc?.d directories, that currently doesn't work.
After reading some of the man pages, it says that Slack has System V compatibility, but I would have to write my own symlink scripts.
The thing is, I don't have the rc?.d directories within /etc/rc.d, rather just files like rc.0, rc.1, etc...
After reading some other man pages and content on the web, it just mentions that those files just controls the runlevels of the system. Says stuff like rc.0 and rc.6 are linked together because they will both suspend or shutdown the system. And their saying that alot of the programs and services run in runlevel rc.3 or something like that, but I don't even see that listed in my /etc/rc.d directory.
Can someone help me figure out how to use BSD style init scripts? If I can figure this out, I think I'll have Slack figured out.
Thanks,
Justin
|
|
|
09-05-2006, 11:53 AM
|
#2
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
Welcome to Slackware.
First of all, in Slack the runlevel 3 is controlled by the /etc/rc.d/rc.M script.
Most of that information can be found in the script itself and you can understand better the startup thing reviewing the /etc/inittab file.
Certainly in Slackware one of the biggest differences is the rc.d directory. Look in there, you should have a bunch of scripts, which are called from one to another when booting up.
If you want a particular service to be called upon startup, just give execution permission to the corresponding script, i.e. if you want samba, issue a chmod +x /etc/rc.d/rc.samba; if you don't want to restart for the service to be called, just execute the file once with the given permission adding start as a parameter: /etc/rc.d/rc.samba start that should give you the samba service running (the configuration file for samba must be at /etc/samba/smb.conf which is missing as default but there is an example to copy in that directory)
You can review any of those scripts to check available options or tweak them a little but carefully (remember to backup properly).
I encourage you to post any doubt that concerns you
Last edited by raska; 09-05-2006 at 11:54 AM.
|
|
|
09-05-2006, 12:26 PM
|
#3
|
Member
Registered: Aug 2006
Posts: 72
Original Poster
Rep:
|
Ok, I tried that, and it appears that the service is still not started.
I just tried Samba. But after I run ./rc.samba start from /etc/rc.d, then rebooted, I ran nmap localhost, and the SMB/CIFS port is still closed. Also, when I startx into KDE, and go into konqueror, and do smb://localhost or smb://127.0.0.1 I get an error "Internal Error Please Send a full bug report at http://.bugs.kde.org Unknown error: error condition in stat: Connection timed out".
So, what that error is telling me is, the SMBD service is not started.
Also, for ProFTPD specifically, I don't see a file that named rc.proftpd in /etc/rc.d, so I'm not sure how I would go about starting any FTP services. I've used VSFTPD before, but wanted to give ProFTPD a shot, and know that Slack comes packed with the app on there, but can't find where to start it from.
Thanks for help
Justin
|
|
|
09-05-2006, 12:33 PM
|
#4
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
For samba, check that the file /etc/samba/smb.conf exists. If it isn't (which is the default), copy it over from the provided /etc/samba/smb.conf-example file and customize it a little. Then restart the service.
For ProFTPd, it is run through the inetd server. Open the /etc/inetd.conf file, you should see a part like this
Code:
# Very Secure File Transfer Protocol (FTP) server.
#ftp stream tcp nowait root /usr/sbin/tcpd vsftpd
#
# Professional File Transfer Protocol (FTP) server.
ftp stream tcp nowait root /usr/sbin/tcpd proftpd
Just uncomment the line that fits your needs, as I also use ProFTPd I uncommented that one. Restart the inetd server to take the changes:
Code:
/etc/rc.d/rc.inetd restart
I'm guessing that your /etc/rc.d/rc.inetd file is executable and you had the service already running as it is by default.
|
|
|
09-05-2006, 01:47 PM
|
#5
|
Member
Registered: Aug 2006
Posts: 72
Original Poster
Rep:
|
Ok, that seemed to work for ProFTPd, but Samba is giving me a heck of a time.
I have ran the /etc/rc.d/rc.samba start, and it doesn't really give any status.
But when I do either /etc/rc.d/samba stop (or restart) I get message "No process killed"
So I started SWAT in the inetd.conf file. I login to SWAT, and then select Start SMBD, and then show the status of the Samba services, the status still reverts back to "Not Running".
You know of anything that would cause Samba to not actually start? I am just running the 2.4.31 kernel (default) in Slack 10.2. I also have the 2.6.17 compiled and installed, and it does the same thing, so it's not kernel modules that aren't loading or anything....
Thanks, Justin
|
|
|
09-05-2006, 01:50 PM
|
#6
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
Do you have the /etc/samba/smb.conf file configured?
You should also review some logs as dmesg, /var/log/messages and /var/log/syslog
|
|
|
09-05-2006, 02:24 PM
|
#7
|
Member
Registered: Aug 2006
Posts: 72
Original Poster
Rep:
|
Ok, that was it. That is silly. I wouldn't have guessed that the smb.conf file wasn't pre-loaded. But, I just edited the smb.conf-sample, and wrote it as smb.conf, and it's running now. Cool. That got that figured out.
One other thing. When I install apps on the system for things like Limewire or something, will it add a line to the inetd.conf file, or would it add a script to the /etc/rc.d directory ? Because I know Gnutella clients such as limewire are supposed to open port 6346 on the system so other Gnutella users can connect to your file server basically.
Thanks, Justin
|
|
|
09-06-2006, 02:48 AM
|
#8
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
In that case, those programs will open up the ports and make the connections on their own at run-time. You don't need to specify anything in inetd.conf, or add any rc.* script, just to use a P2P program.
|
|
|
09-06-2006, 10:32 AM
|
#9
|
Member
Registered: Aug 2006
Posts: 72
Original Poster
Rep:
|
Ok, that's about what I figured, but wanted to make sure.
Thanks, Justin
|
|
|
All times are GMT -5. The time now is 07:44 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
|
|