Re: Install-Fest Question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: Re: Install-Fest Question
On Thu, 2004-06-24 at 13:10, Steve wrote:
> Thank you very very much Alan. Ok I will take down my LAN Friday night and rebuild the machine and be there at 10:00 Sat morning. Concerning the vsftpd, the redhat Bible gave me the vsftpd.conf info I needed, however, I wanted to set vsftpd to come up on boot and I did a ln -s ../init.d/vsftpd S90vsftpd to create a sybolic link in rc5.d with the skeleton script in init.d that looks like this:
>
>
> #! /bin/bash
> #
> # $Id: skeleton,v 1.8 1999/07/19 14:36:10 ray Exp ray $
> #

<snipped>
>
> On boot I'm getting a syntax error, with an entry in /ver/log/messages of:
>
> vsftpd: /etc/rc5.d/S90vsftpd: line 65: syntax error: unexpected end of file
>
> I'm not a great bash script kitty, so a little help here would be nice. I copied this script and I must have left something out, but I don't see it. Do you?
> And a second question: Am I going about this the right way to get it to not only boot but shutdown cleanly?
>

----
you're making this way too hard on yourself.

If you installed vsftdp from redhat rpm...

#rpm -ql vsftpd|grep init.d
/etc/rc.d/init.d/vsftpd

#cat /etc/rc.d/init.d/vsftpd
blah blah blah #I'm not gonna list the whole thing but the sysv init
script is already there...no need to invent a wheel

If you've installed from source (which I haven't done with vsftpd), I
would bet that there is an option to ./configure --enable-redhat (or
similar) which will create the same type of script automatically.

Once you have determined that there is a script, all you need to do is
to issue the right chkconfig commands...

chkconfig --add vsftpd
#creates symlinks in proper rc2.d/rc3.d/rc4.d/rc5.d directories

chkconfig --levels 2345 vsftp on
#as above but only ^^ on these runlevels

chkconfig vsftpd on
#as above on all runlevels

Thoughts about all this...use the redhat scripts if and when provided.
They will incorporate the 'arguments' to the daemons from /etc/sysconfig
(if any), they will provide (hopefully) the proper linking in sequence
on startup/shutdown - hopefully, after firewall and networking is
launched on startup, before network and firewall are turned off on
shutdown, locate the pid properly, etc.

#ls -l /etc/rc.d/init.d/vs* would tell you if it were already there.

The script you had may or may not work, it doesn't seem to be worth
fighting if vsftpd installs a sysv script anyway.

Lastly, you may already be aware of this...ftp daemons traditionally run
under xinetd (or previously, inetd) or if you start it via a sysv
script, it will launch as a standalone daemon. The choice is yours but I
would probably run it inside of xinetd (edit the file
/etc/xinetd.d/vsftpd and change disable = yes, to disable = no) and then
#service xinetd restart

Craig

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss