Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 104802 - code cleanup for init script
code cleanup for init script
Product: Red Hat Linux
Classification: Retired
Component: vsftpd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Mike McLean
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2003-09-22 08:08 EDT by Manoj Kumar
Modified: 2014-03-16 22:38 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.2.1-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-11-25 10:27:33 EST
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 08:10 EDT, Manoj Kumar
no flags Details | Diff

  None (edit)
Description Manoj Kumar 2003-09-22 08:08:34 EDT
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 08:10:57 EDT
Created attachment 94624 [details]
rewrite of start() function in vsftpd init script
Comment 2 Bill Nottingham 2003-11-25 10:27:33 EST
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.