diff options
| author | Anthony Young <sleepsonthefloor@gmail.com> | 2011-03-23 16:11:50 -0700 |
|---|---|---|
| committer | Anthony Young <sleepsonthefloor@gmail.com> | 2011-03-23 16:11:50 -0700 |
| commit | 85ad729e4448bb4211b79e325cef897fc4e2b0bb (patch) | |
| tree | 2c3918b603f1fc667c403f96430eb151c3016658 /bin | |
| parent | 3b381792c2cce1e43f68e39f2fc9c73ba2760024 (diff) | |
| download | nova-85ad729e4448bb4211b79e325cef897fc4e2b0bb.tar.gz nova-85ad729e4448bb4211b79e325cef897fc4e2b0bb.tar.xz nova-85ad729e4448bb4211b79e325cef897fc4e2b0bb.zip | |
make missing noVNC error condition a bit more fool-proof
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-vnc-proxy | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/nova-vnc-proxy b/bin/nova-vnc-proxy index 4cd1e9082..ea2533dc3 100755 --- a/bin/nova-vnc-proxy +++ b/bin/nova-vnc-proxy @@ -44,7 +44,7 @@ from nova.vnc import proxy LOG = logging.getLogger('nova.vnc-proxy') FLAGS = flags.FLAGS -flags.DEFINE_string('vnc_proxy_wwwroot', '/code/noVNC/', +flags.DEFINE_string('vnc_proxy_wwwroot', '/var/lib/nova/noVNC/', 'Full path to noVNC directory') flags.DEFINE_boolean('vnc_debug', False, 'Enable debugging features, like token bypassing') @@ -66,13 +66,15 @@ if __name__ == "__main__": LOG.audit(_("Starting nova-vnc-proxy node (version %s)"), version.version_string_with_vcs()) - if not os.path.exists(FLAGS.vnc_proxy_wwwroot): + if not (os.path.exists(FLAGS.vnc_proxy_wwwroot) and + os.path.exists(FLAGS.vnc_proxy_wwwroot + '/vnc_auto.html')): LOG.info(_("Missing vnc_proxy_wwwroot (version %s)"), FLAGS.vnc_proxy_wwwroot) LOG.info(_("You need a slightly modified version of noVNC " - "to work with the nova-vnc-proxy")) - LOG.info(_("Check out the most recent nova noVNC code here: %s"), - "git://github.com/sleepsonthefloor/noVNC.git") + "to work with the nova-vnc-proxy")) + LOG.info(_("Check out the most recent nova noVNC code: %s"), + "git://github.com/sleepsonthefloor/noVNC.git") + LOG.info(_("And drop it in %s"), FLAGS.vnc_proxy_wwwroot) exit(1) app = proxy.WebsocketVNCProxy(FLAGS.vnc_proxy_wwwroot) |
