|
Last change
on this file since 1472 was
1418,
checked in by broder, 17 years ago
|
|
Small typo fixes in invirt-update-vnc-cert
|
-
Property svn:executable set to
*
|
|
File size:
861 bytes
|
| Rev | Line | |
|---|
| [1413] | 1 | #!/usr/bin/python |
|---|
| [1336] | 2 | |
|---|
| [1413] | 3 | from invirt.config import structs as config |
|---|
| 4 | from subprocess import Popen, call, PIPE |
|---|
| 5 | import tempfile |
|---|
| 6 | import os |
|---|
| 7 | import sys |
|---|
| 8 | import shutil |
|---|
| [1336] | 9 | |
|---|
| [1413] | 10 | def main(): |
|---|
| [1418] | 11 | call(['kinit', '-k', 'daemon/%s' % config.web.hostname]) |
|---|
| [1413] | 12 | |
|---|
| 13 | temp_dir = tempfile.mkdtemp() |
|---|
| 14 | keystore = os.path.join(temp_dir, 'trust.store') |
|---|
| 15 | for host in config.hosts: |
|---|
| [1418] | 16 | cert = Popen(['remctl', config.remote.hostname, 'web', 'vnccert', host.hostname], |
|---|
| 17 | stdout=PIPE) |
|---|
| [1413] | 18 | cert.wait() |
|---|
| [1418] | 19 | call(['keytool', '-import', '-noprompt', '-alias', host.hostname, |
|---|
| 20 | '-keystore', keystore, '-storepass', 'foobar'], |
|---|
| 21 | stdin=cert.stdout) |
|---|
| [1413] | 22 | |
|---|
| [1418] | 23 | call(['jar', 'uf', '/usr/share/invirt-vnc-client/VncViewer.jar', |
|---|
| 24 | '-C', temp_dir, 'trust.store']) |
|---|
| [1413] | 25 | |
|---|
| 26 | shutil.rmtree(temp_dir) |
|---|
| [1336] | 27 | |
|---|
| [1413] | 28 | if __name__ == '__main__': |
|---|
| 29 | sys.exit(main()) |
|---|
Note: See
TracBrowser
for help on using the repository browser.