PacketFence - BTS - PacketFence
View Issue Details
0001562PacketFenceweb adminpublic2012-09-29 16:052015-02-13 15:42
candlerb 
 
normaltweakhave not tried
closedopen 
3.5.1 
investigate 
0001562: Cannot stop running daemon if status is "should be stopped"
After changing configs, it is possible to get into a state where the service status is "should be stopped" but the daemon is still running. In this situation, the GUI does not show the Stop button. e.g.

   dhcpd (expected status) stopped (actual status) running [but no stop button]

The problem is in
html/admin/administration/services.php
where the condition for displaying the stop button is on line 121:

          if (($services[1] == 1) && ($services[2] != 0)) {

services[1] is "shouldBeStarted" and services[2] is pid (or 0 for not running)

I suggest this is changed to just:

          if ($services[2] != 0) {

so that you can always stop a running daemon.

However the same block also controls the display of the "restart" button, and that should be controlled by the original condition.
No tags attached.
Issue History
2012-09-29 16:05candlerbNew Issue
2012-09-30 02:37candlerbNote Added: 0003111
2012-10-19 11:07fgaudreaultTarget Version => investigate
2015-02-13 15:42lmunroNote Added: 0003824
2015-02-13 15:42lmunroStatusnew => closed

Notes
(0003111)
candlerb   
2012-09-30 02:37   
Patch submitted at https://github.com/inverse-inc/packetfence/pull/70 [^]

Tested as follows: remove enforcement=vlan from all interfaces, then status of dhcpd/named is "should be stopped"
(0003824)
lmunro   
2015-02-13 15:42   
These bugs have been sitting untouched since 2012.
Closing them and possibly reopening in github tracker where relevant.