From: <do...@hy...> - 2007-11-15 05:15:01
|
Author: dougm Date: 2007-11-14 21:14:58 -0800 (Wed, 14 Nov 2007) New Revision: 6815 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=6815 Modified: trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesDetector.java trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesMgrService.java trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesProductPlugin.java Log: [HHQ-1258] Check AIX installpaths during discovery Modified: trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesDetector.java =================================================================== --- trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesDetector.java 2007-11-15 03:53:23 UTC (rev 6814) +++ trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesDetector.java 2007-11-15 05:14:58 UTC (rev 6815) @@ -63,14 +63,14 @@ return null; //registry scan will pick it up. } - //always installed in /opt/mqm - String path = MQSeriesProductPlugin.DEFAULT_UNIX_INST[0]; - if (new File(path).exists()) { - return getServerList(path); + final String[] dirs = MQSeriesProductPlugin.DEFAULT_UNIX_INST; + for (int i=0; i<dirs.length; i++) { + String path = dirs[i]; + if (new File(path).exists()) { + return getServerList(path); + } } - else { - return null; - } + return null; } public List getServerResources(ConfigResponse platformConfig, String path) throws PluginException { Modified: trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesMgrService.java =================================================================== --- trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesMgrService.java 2007-11-15 03:53:23 UTC (rev 6814) +++ trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesMgrService.java 2007-11-15 05:14:58 UTC (rev 6815) @@ -100,6 +100,10 @@ } }); + if (dirs == null) { + return new String[0]; + } + String[] names = new String[dirs.length]; for (int i=0; i<dirs.length; i++) { Modified: trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesProductPlugin.java =================================================================== --- trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesProductPlugin.java 2007-11-15 03:53:23 UTC (rev 6814) +++ trunk/plugins/mqseries/src/org/hyperic/hq/plugin/mqseries/MQSeriesProductPlugin.java 2007-11-15 05:14:58 UTC (rev 6815) @@ -50,7 +50,9 @@ "mqseries." + ProductPlugin.PROP_INSTALLPATH; static final String[] DEFAULT_UNIX_INST = { - "/opt/mqm", + "/opt/mqm", //linux+solaris + "/usr/lpp/mqm", //aix + "/usr/mqm" //aix }; private static final String[] DEFAULT_WIN32_INST = { |