Bug 158714
Summary: | 'service vsftpd start' says OK even if exit status of vsftpd binary is 1, and does not pass on errors from that binary | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Mike MacCana <mmaccana> |
Component: | vsftpd | Assignee: | Radek Vokál <rvokal> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | CC: | milan.kerslager |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-06-30 08:23:07 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike MacCana
2005-05-25 02:56:35 UTC
I'm pretty sure: echo -n $"Starting $prog for $site: " /usr/sbin/vsftpd $i & RETVAL=$? will gives the RETVAL of the echo command in most cases. Try it on the command line: # echo # vsftpd /etc/vsftpd/vsftpd.conf & echo $? [1] 5014 0 500 OOPS: missing value in config file for: pretendoption [1]+ Exit 1 vsftpd /etc/vsftpd/vsftpd.conf True, it doesn't get the return value from forked proces. I wonder why this script is not working with daemon command ... will try to figure it out. Fix applied on rawhide (vsftpd-2.0.3-6). This changes default behavior of vsftpd as it has to be started in background to get the proper return value. This bug has been reported in the bug #164998 too (which is CLOSED RAWHIDE because another bug report). Looking for the RHEL4 U3. Sorry, it's closed as NEXTRELEASE, so it won't hit RHEL4 but it's planned for RHEL5. Is it possible to use daemon() function to get proper RETCODE without changing default behaviour of vsftpd binary itself? Yes, in vsftpd.conf set background=YES. Now you can use daemon() and get the RETCODE. I see the need to change config file and thus NEXTRELEASE. You may fix init script by using shell commands: ... /usr/sbin/vsftpd $i & PID=$! sleep 1s [ -d /proc/$PID ] && success $"$prog $site" || failure $"$prog $site" ... This is a really bug to report [OK] even vsftpd daemon does not start at all. Well, you can't be sure that one second is enough and introducing unnecessary delay is not very nice solution. Anyway, I'll discuss it with other developers and our quality team, if they have any opinion about this. You are right. This is only "not always broken" solution... But IIRC similar workaround has been used in another package too. |