Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master aca8914ed -> bdcc5ced6


MS SQL blueprint - improve installation script

pass the exit code from the install command to the install script


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/3671f943
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/3671f943
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/3671f943

Branch: refs/heads/master
Commit: 3671f943d662f7c7331b4734336583037d92ee9f
Parents: 0c85cd9
Author: Valentin Aitken <[email protected]>
Authored: Mon Sep 28 19:10:22 2015 +0300
Committer: Valentin Aitken <[email protected]>
Committed: Mon Sep 28 19:10:22 2015 +0300

----------------------------------------------------------------------
 .../apache/brooklyn/entity/database/mssql/installmssql.ps1   | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3671f943/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
index 6c1f30b..fcbf54a 100644
--- 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
@@ -41,9 +41,5 @@ $pass = '${attribute['windows.password']}'
 $secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
 $mycreds = New-Object System.Management.Automation.PSCredential 
($($env:COMPUTERNAME + "\Administrator"), $secpasswd)
 
-Invoke-Command -ComputerName localhost -credential $mycreds -scriptblock {
-    param($driveLetter)
-    Start-Process ( $driveLetter + "setup.exe") -ArgumentList 
"/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput 
"C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait
-} -Authentication CredSSP -argumentlist $driveLetter
-
-## Process complete
\ No newline at end of file
+$process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList 
"/ConfigurationFile=C:\ConfigurationFile.ini" -Credential $mycreds 
-RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" 
-Wait -PassThru
+exit $process.ExitCode

Reply via email to