#4622 Problem stopping Hyperic Open Source on QNAP NAS

Bug
open
nobody
None
1
2013-10-06
2013-10-06
No

Hi Hyperic

I have an issue on the QNAP NAS when i try stopping Hyperic using "./hq-agent.sh stop"

It would be stuck on "Waiting for HQ Agent to exit..." forever.

Afer some investigating i found out that the check whether Hyperic stopped properly is not working properly.

bundles/agent-5.0.0/bin/hq-agent.sh - testpid function

The following line tries to obtain the pid number of the Hyperic process
pid=$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1 2>/dev/null

The problem is that while grep is removed from the returned ps list, ps itself is not removed which means this command will allways return a pid number

I fixed this by changing it to:
pid=$PSEXE -p $pid | grep $pid | grep "$WRAPPER_CMD_PS" | awk '{print $1}' | tail -1 2>/dev/null

Don't know if this is a proper fix but it works for me

Kind regards

Discussion


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks