Changeset 1413
- Timestamp:
- Oct 29, 2008, 12:00:15 AM (16 years ago)
- Location:
- trunk/packages/invirt-vnc-client/debian
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-vnc-client/debian/changelog
r1345 r1413 1 invirt-vnc-client (0.0.4) unstable; urgency=low 2 3 * Get certificates from remctl, instead of from the filesystems 4 5 -- Evan Broder <broder@mit.edu> Tue, 28 Oct 2008 23:55:43 -0400 6 1 7 invirt-vnc-client (0.0.3) unstable; urgency=low 2 8 -
trunk/packages/invirt-vnc-client/debian/invirt-update-vnc-cert
r1345 r1413 1 #!/ bin/bash1 #!/usr/bin/python 2 2 3 if [ "$(ls /etc/invirt/vnc-cert.d)" == "" ]; then 4 echo "E: No certs in /etc/invirt/vnc-cert.d/" >&2 5 echo " Put certificates for all Invirt VNC proxy servers in" >&2 6 echo " /etc/invirt/vnc-cert.d, then run this script again" >&2 7 exit 1 8 fi 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 9 9 10 TMP_DIR="$(mktemp -d)" 11 for i in /etc/invirt/vnc-cert.d/*.crt; do 12 keytool -import -noprompt -alias "$(basename "${i%.crt}")" -file \ 13 "$i" -keystore "$TMP_DIR/trust.store" -storepass "foobar" 14 done 10 def main(): 11 subprocess.call(['kinit', '-k', 'daemon/%s' % config.web.hostname]) 12 13 temp_dir = tempfile.mkdtemp() 14 keystore = os.path.join(temp_dir, 'trust.store') 15 for host in config.hosts: 16 cert = subprocess.Popen(['remctl', config.remote.hostname, 'web', 17 'vnccert', host.hostname], 18 stdout=PIPE) 19 cert.wait() 20 subprocess.call(['keytool', '-import', '-noprompt', '-alias', 21 host.hostname, '-keystore', keystore, '-storepass', 22 'foobar'], stdin=cert.stdout) 23 24 subprocess.call(['jar', 'uf', '/usr/share/invirt-vnc-client/VncViewer.jar', 25 '-C', temp_dir, 'trust.store']) 26 27 shutil.rmtree(temp_dir) 15 28 16 jar uf /usr/share/invirt-vnc-client/VncViewer.jar -C "$TMP_DIR" trust.store 17 18 rm -rf "$TMP_DIR" 29 if __name__ == '__main__': 30 sys.exit(main()) -
trunk/packages/invirt-vnc-client/debian/invirt-vnc-client.dirs
r1336 r1413 1 etc/invirt/vnc-cert.d2 1 usr/share/invirt-vnc-client
Note: See TracChangeset
for help on using the changeset viewer.