summaryrefslogtreecommitdiff
path: root/cpp/demo/IceGrid/secure/expect.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-05-12 14:29:28 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-05-12 14:29:28 -0230
commit685032e9c751fd50cc7820baf35db24a782569b6 (patch)
tree98042b671487e0e7e20120ae955507b952eb4b55 /cpp/demo/IceGrid/secure/expect.py
parentBug 3418 - deprecate ice_hash/ice_getHash where not needed (diff)
downloadice-685032e9c751fd50cc7820baf35db24a782569b6.tar.bz2
ice-685032e9c751fd50cc7820baf35db24a782569b6.tar.xz
ice-685032e9c751fd50cc7820baf35db24a782569b6.zip
Bug 3922 - IceGrid/secure expect script not require ICE_HOME
Diffstat (limited to 'cpp/demo/IceGrid/secure/expect.py')
-rwxr-xr-xcpp/demo/IceGrid/secure/expect.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/cpp/demo/IceGrid/secure/expect.py b/cpp/demo/IceGrid/secure/expect.py
index c81348de4b0..f53a592eb38 100755
--- a/cpp/demo/IceGrid/secure/expect.py
+++ b/cpp/demo/IceGrid/secure/expect.py
@@ -34,9 +34,21 @@ if Util.defaultHost:
else:
args = ''
+icecaPath = ""
+if os.environ.get("ICE_HOME", "") != "":
+ icecaPath = os.environ["ICE_HOME"]
+elif os.path.isdir(os.path.join(path[0], "cpp")):
+ icecaPath = os.path.join(path[0], "cpp")
+
+command = 'python -u makecerts.py'
+if icecaPath != "":
+ command += " --iceca=" + os.path.join(icecaPath, "bin", "iceca")
+
+print command
+
print "creating certificates...",
sys.stdout.flush()
-makecerts = Util.spawn('python -u makecerts.py --iceca=' + os.path.join(Util.getIceDir("cpp"), "bin", "iceca"))
+makecerts = Util.spawn(command)
makecerts.expect("Do you want to keep this as the CA subject name?")
makecerts.sendline("y")
makecerts.expect("Enter the email address of the CA:")