[simias-svn] SF.net SVN: simias:[7327] trunk/src
Brought to you by:
srinidhi_bs
|
From: <he...@us...> - 2010-03-10 06:19:04
|
Revision: 7327
http://simias.svn.sourceforge.net/simias/?rev=7327&view=rev
Author: hegdegg
Date: 2010-03-10 06:18:57 +0000 (Wed, 10 Mar 2010)
Log Message:
-----------
Error handling for admin setup. Fixed the check of incorrect env
variable to decide the os architecture.
Modified Paths:
--------------
trunk/src/server/setup/iFolderWebSetup.cs
trunk/src/webservices/iFolderServer.cs
Modified: trunk/src/server/setup/iFolderWebSetup.cs
===================================================================
--- trunk/src/server/setup/iFolderWebSetup.cs 2010-03-10 06:10:38 UTC (rev 7326)
+++ trunk/src/server/setup/iFolderWebSetup.cs 2010-03-10 06:18:57 UTC (rev 7327)
@@ -145,13 +145,21 @@
/// </summary>
void UpdateOwnership()
{
- string MachineArch = Environment.GetEnvironmentVariable("OS_TYPE");
- string webpath = (MachineArch.IndexOf("_64") > 0) ? Path.GetFullPath("../lib64/simias/web"): Path.GetFullPath("../lib/simiasweb");
- string webconfigfile = Path.Combine(webpath, "web.config");
+ try
+ {
+ string MachineArch = Environment.GetEnvironmentVariable("HOSTTYPE");
+ string webpath = (MachineArch.IndexOf("_64") > 0) ? Path.GetFullPath("../lib64/simias/web"): Path.GetFullPath("../lib/simiasweb");
+ string webconfigfile = Path.Combine(webpath, "web.config");
- if (Execute("chown", "{0}:{1} {2}", apacheUser.Value, apacheGroup.Value, webconfigfile) != 0)
+ if (Execute("chown", "{0}:{1} {2}", apacheUser.Value, apacheGroup.Value, webconfigfile) != 0)
+ {
+ throw new Exception("Unable to set an owner for the web.config file.");
+ }
+ }
+ catch (Exception ex)
{
- throw new Exception("Unable to set an owner for the log path.");
+ Console.WriteLine("Unable to set an owner for web.config file");
+
}
}
Modified: trunk/src/webservices/iFolderServer.cs
===================================================================
--- trunk/src/webservices/iFolderServer.cs 2010-03-10 06:10:38 UTC (rev 7326)
+++ trunk/src/webservices/iFolderServer.cs 2010-03-10 06:18:57 UTC (rev 7327)
@@ -800,7 +800,7 @@
{
if (masterAddress.ToLower().StartsWith(Uri.UriSchemeHttps))
{
- string machineArch = Environment.GetEnvironmentVariable("OS_TYPE");
+ string machineArch = Environment.GetEnvironmentVariable("HOSTTYPE");
string webPath = ( machineArch.IndexOf("_64" ) > 0 ? Path.GetFullPath("../../../../lib64/simias/web"): Path.GetFullPath("../../../../lib/simias/web"));
// swap policy
ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|