Bug 104802 - code cleanup for init script
Summary: code cleanup for init script
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vsftpd (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Mike McLean
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-22 12:08 UTC by Manoj Kumar
Modified: 2014-03-17 02:38 UTC (History)
1 user (show)

Fixed In Version: 1.2.1-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-11-25 15:27:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
rewrite of start() function in vsftpd init script (1.33 KB, patch)
2003-09-22 12:10 UTC, Manoj Kumar
no flags Details | Diff

Description Manoj Kumar 2003-09-22 12:08:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Description of problem:
The vsftpd startup script /etc/rc.d/init.d/vsftpd has a couple of
bogus lines in the start() function:
    daemon true
The first line seems to be there simply to get the '[ OK ]' message
on the screen.  If so, it's better to use the success() function.
The second line is misleading because $? is the return value of the
daemon() function, which will always be 0 here.

The script also uses needlessly complicated indexing to iterate
over the config files where a simple for-loop suffices.

Another minor problem is the message that gets displayed
by these lines:
    site=`basename ${sites[${index}]} .conf`
    echo -n $"Starting $prog for $site: "
Since typically there is only one config file vsftpd.conf, this
results in the slightly baffling message
    Starting vsftpd for vsftpd

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
look at the code   

Additional info:

Attached is a patch to fix all these problems.  I return 0 from
start() because I cannot think of a reliable way to see if
vsftpd started up successfully.

Comment 1 Manoj Kumar 2003-09-22 12:10:57 UTC
Created attachment 94624 [details]
rewrite of start() function in vsftpd init script

Comment 2 Bill Nottingham 2003-11-25 15:27:33 UTC
Should be fixed in 1.2.1-1.

Note You need to log in before you can comment on or make changes to this bug.