LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-05-2006, 11:27 AM   #1
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Rep: Reputation: 15
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
 
Old 09-05-2006, 11:53 AM   #2
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
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.
 
Old 09-05-2006, 12:26 PM   #3
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 09-05-2006, 12:33 PM   #4
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
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.
 
Old 09-05-2006, 01:47 PM   #5
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 09-05-2006, 01:50 PM   #6
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
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
 
Old 09-05-2006, 02:24 PM   #7
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 09-06-2006, 02:48 AM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
Old 09-06-2006, 10:32 AM   #9
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Original Poster
Rep: Reputation: 15
Ok, that's about what I figured, but wanted to make sure.

Thanks, Justin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SysV versuses BSD-Style Artimus Linux - General 18 03-02-2016 05:16 AM
BSD style mount union on Linux andrewholt Linux - General 1 05-03-2006 02:41 AM
Wireless USB init, Slackware style Tylerious Slackware 9 12-15-2005 10:38 PM
Which distros use BSD-style layout for initialization files, and which System V's? kornerr Linux - General 5 06-11-2005 09:27 PM
sysV vs bsd starting scripts sqn Linux From Scratch 3 06-16-2002 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:44 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