#20 service status bugfix

open
Corey
None
5
2006-05-08
2006-05-08
kristaps kukurs
No

Sorry for my english.
I have send a email to admin@ravencore dot com but
there is no replay, so I decided to post it here.

----------------------------------
some system services does not report correct
service on|off status.
----------------------------------

solution:
edit is_service_running shell script and

change
is_stopped=$($_echo $status_output |
grep '[stopped||not.*running]')
to
is_stopped=$($_echo $status_output | grep -
v '[stopped||not.*running]')

----------------------------------
Startup Services panel shows status correctly but does
not work on|off buttons
----------------------------------

solution:

edit chkconfig.php :
change

socket_cmd("chkconfig --level 3 $_GET[service] $_GET
[status]");

to

$runlevel=exec("grep ':initdefault:' /etc/inittab |
sed 's/:/ /g' | awk '{print $2}'");
if($runlevel<2)$runlevel=3;
socket_cmd("chkconfig --level $runlevel $_GET[service]
$_GET[status]");

Discussion

    • assigned_to: nobody --> cormander