Bug 104802 - code cleanup for init script
code cleanup for init script
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: vsftpd (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Mike McLean
: FutureFeature
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2003-11-25 10:27:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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
    RETVAL=$?
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):
vsftpd-1.1.3-8

How reproducible:
Always

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.