diff options
author | lambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 21:51:33 +0000 |
---|---|---|
committer | lambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 21:51:33 +0000 |
commit | 1ae6085d5e8714dbac1b5f0783cf0f774646c8a2 (patch) | |
tree | 12cf2e1b72e9366435f514e25feadcbac0bccdb3 | |
parent | 492dd9ed972fab17ca530c6e9a5b8a796b56acab (diff) | |
download | chromium_src-1ae6085d5e8714dbac1b5f0783cf0f774646c8a2.zip chromium_src-1ae6085d5e8714dbac1b5f0783cf0f774646c8a2.tar.gz chromium_src-1ae6085d5e8714dbac1b5f0783cf0f774646c8a2.tar.bz2 |
Delete host.json and exit if Host ID deleted from server
Follows on from http://codereview.chromium.org/9303008/. This looks at the
exit-code from remoting_me2me_host. If the reason for termination was that the
Host ID is no longer valid on the server, this deletes the host.json and
terminates the running daemon (shutting down the X session).
BUG=110046
TEST=Manual
Review URL: https://chromiumcodereview.appspot.com/9322001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120410 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | remoting/tools/me2me_virtual_host.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py index 209c3ad..b37c538 100755 --- a/remoting/tools/me2me_virtual_host.py +++ b/remoting/tools/me2me_virtual_host.py @@ -653,6 +653,12 @@ def main(): if desktop.host_proc is not None and pid == desktop.host_proc.pid: logging.info("Host process terminated") desktop.host_proc = None + if os.WEXITSTATUS(status) == 1: + logging.info("Host ID has been deleted - exiting.") + # Host config is no longer valid. Delete it, so the next time this + # script is run, a new Host ID will be created and registered. + os.remove(host.config_file) + return 0 if __name__ == "__main__": |