Chromium Code Reviews| Index: remoting/tools/me2me_virtual_host.py |
| diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py |
| index 53a3118bc1602be68594b5668b48051abd2d2414..ed4659acc269c8f95925074c03122e9be3e069d3 100755 |
| --- a/remoting/tools/me2me_virtual_host.py |
| +++ b/remoting/tools/me2me_virtual_host.py |
| @@ -566,6 +566,9 @@ Web Store: https://chrome.google.com/remotedesktop""" |
| parser.add_option("", "--add-user", dest="add_user", default=False, |
| action="store_true", |
| help="Add current user to the chrome-remote-desktop group.") |
| + parser.add_option("", "--host-version", dest="host_version", default=False, |
| + action="store_true", |
| + help="Prints version of the host.") |
| (options, args) = parser.parse_args() |
| host_hash = hashlib.md5(socket.gethostname()).hexdigest() |
| @@ -599,7 +602,12 @@ Web Store: https://chrome.google.com/remotedesktop""" |
| "\"groupadd -f %(group)s && gpasswd --add %(user)s %(group)s\"" % |
| { 'group': CHROME_REMOTING_GROUP_NAME, |
| 'user': getpass.getuser() }) |
| - return os.system(command) |
| + return os.system(command) >> 8 |
| + |
| + if options.host_version: |
| + # TODO(sergeyu): Also check RPM package version once we add RPM package. |
| + return os.system("set -o pipefail;" + |
| + "dpkg -s chrome-remote-desktop | awk '/^Version:/ { print $2; }'") >> 8 |
|
Jamie
2012/09/06 01:29:50
Yikes! I wonder if it would be cleaner to use @@VE
Sergey Ulanov
2012/09/06 19:31:58
Done.
|
| if not options.start: |
| # If no modal command-line options specified, print an error and exit. |