Bug 476846 - Double [OK] when stopping dhcpd
Double [OK] when stopping dhcpd
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-17 09:26 EST by Jan ONDREJ
Modified: 2008-12-19 15:09 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-18 17:44:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan ONDREJ 2008-12-17 09:26:16 EST
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 15:39:06 EST
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 02:18:27 EST
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 02:31:09 EST
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 17:44:57 EST
(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 12:52:28 EST
(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 15:09:28 EST
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.

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