Kaydet (Commit) 73971533 authored tarafından Ingo Schmidt's avatar Ingo Schmidt

native330 #163564# fixing installation on Cent OS

üst 109c2197
......@@ -76,6 +76,7 @@ public class InstallData
static private boolean useRtl = false;
static private boolean installedProductMinorSet = false;
static private boolean isDebianSystem = false;
static private boolean useForceDebian = false;
static private boolean debianInvestigated = false;
static private String installType; /* custom or typical installation */
static private String osType; /* Linux, SunOS, ... */
......@@ -667,6 +668,14 @@ public class InstallData
isDebianSystem = value;
}
public boolean useForceDebian() {
return useForceDebian;
}
public void setUseForceDebian(boolean value) {
useForceDebian = value;
}
public boolean databaseQueried() {
return databaseQueried;
}
......
......@@ -383,21 +383,32 @@ import java.util.Vector;public class LinuxHelper {
public void investigateDebian(InstallData data) {
// String rpmQuery = "rpm --help;
String[] rpmQueryArray = new String[2];
rpmQueryArray[0] = "rpm";
rpmQueryArray[1] = "--help";
// First check: Is this a Debian system?
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
String dpkgFile = "/usr/bin/dpkg";
// Checking if the return vector contains the string "force-debian"
if ( new File(dpkgFile).exists() ) {
for (int i = 0; i < returnVector.size(); i++) {
String line = (String) returnVector.get(i);
if ( line.indexOf("force-debian") > -1 ) {
data.setIsDebianSystem(true);
data.setIsDebianSystem(true);
// Second check: If this is a Debian system, is "--force-debian" required?
// 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);
}
}
}
}
......
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