VMware Cloud Community
davidk_hyperic
Contributor
Contributor

4.1.2 / (open)Solaris: proposed agent wrapper cleanup

Greetings,

After looking at these errors for several months, I got around to actually looking into the script. Here's a short fix:

248 # Resolve the os
249 #DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
250 DIST_OS=`uname -s | tr -s '[:upper:]' '[:lower:]' | tr -d '[:blank:]'`
251 DIST_BITS="32"
252 case "$DIST_OS" in
253 'sunos')

(i.e. single-quote the argument for tr)

Second, On sunos, hyperic is still using quite archaic /usr/ucb/ps. Perhaps using pgrep could simplify things, like this:

% :/home/hyperic/agent-4.1.2/bundles/agent-4.1.2-1053/bin [19:26] <77> pgrep wrapper
27854

Just my $.02

Regards,

/David
0 Kudos
2 Replies
excowboy
Virtuoso
Virtuoso

Hi David,

the hq-agent.sh script is based on the Java Service Wrapper script. You will find the usage of /usr/ucb/ps if you download the latest Java Service Wrapper from tanukisoftware.

I have noticed some other problems with the script and made some changes to the script:
http://support.hyperic.com/display/hypcomm/HQ+Agent+Start+Script

It would be great if you could test it

Cheers,
Mirko
davidk_hyperic
Contributor
Contributor

Thank you Mirko!

Looks good to me (in prod.)

Cheers,

David
0 Kudos