From: <do...@hy...> - 2008-05-29 17:56:53
|
Author: dougm Date: 2008-05-29 10:56:50 -0700 (Thu, 29 May 2008) New Revision: 9680 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=9680 Modified: trunk/src/org/hyperic/hq/product/DaemonDetector.java trunk/src/org/hyperic/hq/product/ServerDetector.java Log: [HHQ-1649] Allow command-line args to override installpath too Modified: trunk/src/org/hyperic/hq/product/DaemonDetector.java =================================================================== --- trunk/src/org/hyperic/hq/product/DaemonDetector.java 2008-05-29 06:36:28 UTC (rev 9679) +++ trunk/src/org/hyperic/hq/product/DaemonDetector.java 2008-05-29 17:56:50 UTC (rev 9680) @@ -180,6 +180,11 @@ id = server.getIdentifier(); //might be defined in plugin.xml } server.setIdentifier(formatName(id, pconfig, sconfig, oconfig)); + + String installpath = (String)opts.get(INSTALLPATH); + if (installpath != null) { + server.setInstallPath(installpath); + } } protected ServerResource newServerResource(long pid, String exe) { Modified: trunk/src/org/hyperic/hq/product/ServerDetector.java =================================================================== --- trunk/src/org/hyperic/hq/product/ServerDetector.java 2008-05-29 06:36:28 UTC (rev 9679) +++ trunk/src/org/hyperic/hq/product/ServerDetector.java 2008-05-29 17:56:50 UTC (rev 9680) @@ -78,7 +78,7 @@ private static final String VERSION_FILE = "VERSION_FILE"; private static final String INSTALLPATH_MATCH = "INSTALLPATH_MATCH"; private static final String INSTALLPATH_NOMATCH = "INSTALLPATH_NOMATCH"; - private static final String INSTALLPATH = "INSTALLPATH"; + protected static final String INSTALLPATH = "INSTALLPATH"; protected static final String INVENTORY_ID = "INVENTORY_ID"; private static final String AUTOINVENTORY_NAME = "AUTOINVENTORY_NAME"; private static final String[] NO_ARGS = new String[0]; |