From: <do...@hy...> - 2009-02-11 22:51:19
|
Author: dougm Date: 2009-02-11 14:19:30 -0800 (Wed, 11 Feb 2009) New Revision: 12483 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=12483 Modified: branches/HQ_4_1/src/org/hyperic/hq/product/util/PluginDumper.java Log: [HHQ-2801] set agent.bundle.home property (merged r12482 from trunk) Modified: branches/HQ_4_1/src/org/hyperic/hq/product/util/PluginDumper.java =================================================================== --- branches/HQ_4_1/src/org/hyperic/hq/product/util/PluginDumper.java 2009-02-11 22:15:31 UTC (rev 12482) +++ branches/HQ_4_1/src/org/hyperic/hq/product/util/PluginDumper.java 2009-02-11 22:19:30 UTC (rev 12483) @@ -45,6 +45,7 @@ import java.util.Map; import java.util.Properties; +import org.hyperic.hq.agent.AgentConfig; import org.hyperic.hq.measurement.UnitsConvert; import org.hyperic.hq.product.AutoinventoryPluginManager; import org.hyperic.hq.product.CollectorExecutor; @@ -326,11 +327,15 @@ this.config.init(); - if (!new File(this.config.pdkDir).exists()) { + File pdkDir = new File(this.config.pdkDir); + if (!pdkDir.exists()) { System.out.println(this.config.pdkDir + " does not exist"); System.exit(1); } - + final String bh = AgentConfig.AGENT_BUNDLE_HOME; + if (System.getProperty(bh) == null) { + System.setProperty(bh, pdkDir.getParent()); + } this.ppm = new ProductPluginManager(this.config.props); this.ppm.setRegisterTypes(this.config.registerTypes); this.ppm.init(); |