Bug 476846

Summary: Double [OK] when stopping dhcpd
Product: [Fedora] Fedora Reporter: Jan ONDREJ <ondrejj>
Component: dhcpAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: dcantrell, wwoods
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: 2008-12-18 22:44:57 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 Jan ONDREJ 2008-12-17 14:26:16 UTC
Description of problem:
When stopping dhcpd, there is two times showed the "[ OK ]" string.

Version-Release number of selected component (if applicable):
dhcp-4.0.0-32.fc10.i386
I think also for fc8 and fc9 version.

How reproducible:
Always.

Steps to Reproduce:
1. configure an example dhcpd or run this on a server running dhcpd
2. /etc/init.d/dhcpd start
3. /etc/init.d/dhcpd stop

  
Actual results:
[  OK  ] down dhcpd: [  OK  ]


Expected results:
Shutting down dhcpd: [  OK  ]


Additional info:
This problem can be fixed by removing this line from /etc/init.d/dhcpd:
    [ $RETVAL = 0 ] && success || failure
in stop() function.

This line is not required and current init script does this automatically on error status of this script. There is also no success/failure command in start() function only in stop() function of dhcpd init script.

If you need patch, please tell me.

Comment 1 David Cantrell 2008-12-17 20:39:06 UTC
I'm not seeing this happen in rawhide, can you verify?

[root@electron etc]# service dhcpd start
Starting dhcpd:                                            [  OK  ]
[root@electron etc]# service dhcpd stop
Shutting down dhcpd:                                       [  OK  ]
[root@electron etc]# /etc/init.d/dhcpd start
Starting dhcpd:                                            [  OK  ]
[root@electron etc]# /etc/init.d/dhcpd stop
Shutting down dhcpd:                                       [  OK  ]

Comment 2 Jan ONDREJ 2008-12-18 07:18:27 UTC
I can't. I have no rawhide installed.

Can you try to remove this line and verify on rawhide, if it still show good output?

Can you verify on F10?

Comment 3 Jan ONDREJ 2008-12-18 07:31:09 UTC
This may be helps you with this test:

[root@dhcp1 ~]# export LANG=C
[root@dhcp1 ~]# sed 's/^.*success .. failure//' < /etc/init.d/dhcpd > /tmp/dhcpd
[root@dhcp1 ~]# /tmp/dhcpd restart
Shutting down dhcpd:                                       [  OK  ]
Starting dhcpd:                                            [  OK  ]
[root@dhcp1 ~]# diff -u /etc/init.d/dhcpd /tmp/dhcpd
--- /etc/init.d/dhcpd   2008-06-21 22:14:17.000000000 +0200
+++ /tmp/dhcpd  2008-12-18 08:30:08.000000000 +0100
@@ -97,7 +97,7 @@
     killproc $prog
     RETVAL=$?
 
-    [ $RETVAL = 0 ] && success || failure
+
     echo
     [ $RETVAL = 0 ] && rm -f $lockfile
     return $RETVAL
[root@dhcp1 ~]# 

This is on F10.

Comment 4 David Cantrell 2008-12-18 22:44:57 UTC
(In reply to comment #2)
> I can't. I have no rawhide installed.
> 
> Can you try to remove this line and verify on rawhide, if it still show good
> output?

I tried on rawhide without making any changes to the dhcpd init script and the output was fine.

> Can you verify on F10?

I have verified on F-10 and rawhide that I do not see an extra [OK] printed when you run 'dhcpd restart'.  I haven't made any changes to the init script and it works fine.

I did make the change you suggested and noticed the output looks identical to what it did before.  The lines are unnecessary at this point, I guess.  Removing them in rawhide.

Comment 5 Jan ONDREJ 2008-12-19 17:52:28 UTC
(In reply to comment #4)
> (In reply to comment #2)
> I did make the change you suggested and noticed the output looks identical to
> what it did before.  The lines are unnecessary at this point, I guess. 
> Removing them in rawhide.

Thank you.

Can you please change this for F10 when yum will make other changes to this package?

Comment 6 David Cantrell 2008-12-19 20:09:28 UTC
I don't view this problem (which I can't even reproduce, btw) as critical enough to be in an F-10 update to this package.