Kaydet (Commit) b6b8f0c4 authored tarafından Kurt Zenker's avatar Kurt Zenker

CWS-TOOLING: integrate CWS native330

...@@ -76,6 +76,7 @@ public class InstallData ...@@ -76,6 +76,7 @@ public class InstallData
static private boolean useRtl = false; static private boolean useRtl = false;
static private boolean installedProductMinorSet = false; static private boolean installedProductMinorSet = false;
static private boolean isDebianSystem = false; static private boolean isDebianSystem = false;
static private boolean useForceDebian = false; /* --force-debian */
static private boolean debianInvestigated = false; static private boolean debianInvestigated = false;
static private String installType; /* custom or typical installation */ static private String installType; /* custom or typical installation */
static private String osType; /* Linux, SunOS, ... */ static private String osType; /* Linux, SunOS, ... */
...@@ -667,6 +668,14 @@ public class InstallData ...@@ -667,6 +668,14 @@ public class InstallData
isDebianSystem = value; isDebianSystem = value;
} }
public boolean useForceDebian() {
return useForceDebian;
}
public void setUseForceDebian(boolean value) {
useForceDebian = value;
}
public boolean databaseQueried() { public boolean databaseQueried() {
return databaseQueried; return databaseQueried;
} }
......
...@@ -383,21 +383,33 @@ import java.util.Vector;public class LinuxHelper { ...@@ -383,21 +383,33 @@ import java.util.Vector;public class LinuxHelper {
public void investigateDebian(InstallData data) { public void investigateDebian(InstallData data) {
// String rpmQuery = "rpm --help; // First check: Is this a Debian system?
String[] rpmQueryArray = new String[2];
rpmQueryArray[0] = "rpm";
rpmQueryArray[1] = "--help";
Vector returnVector = new Vector(); String dpkgFile = "/usr/bin/dpkg";
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
// Checking if the return vector contains the string "force-debian" if ( new File(dpkgFile).exists() ) {
for (int i = 0; i < returnVector.size(); i++) { data.setIsDebianSystem(true);
String line = (String) returnVector.get(i);
if ( line.indexOf("force-debian") > -1 ) { // Second check: If this is a Debian system, is "--force-debian" required? Older
data.setIsDebianSystem(true); // versions do not support "--force-debian".
// String rpmQuery = "rpm --help;
String[] rpmQueryArray = new String[2];
rpmQueryArray[0] = "rpm";
rpmQueryArray[1] = "--help";
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
// Checking if the return vector contains the string "force-debian"
for (int i = 0; i < returnVector.size(); i++) {
String line = (String) returnVector.get(i);
if ( line.indexOf("force-debian") > -1 ) {
data.setUseForceDebian(true);
}
} }
} }
} }
......
...@@ -66,7 +66,6 @@ sub usage ...@@ -66,7 +66,6 @@ sub usage
{ {
print <<Ende; print <<Ende;
---------------------------------------------------------------------- ----------------------------------------------------------------------
$prog V1.0 (c) Sun Microsystems 2009
This program installs a Windows Installer installation set This program installs a Windows Installer installation set
without using msiexec.exe. The installation is comparable without using msiexec.exe. The installation is comparable
with an administrative installation using the Windows Installer with an administrative installation using the Windows Installer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment