Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: remoting/tools/me2me_virtual_host.py

Issue 10909090: Implement DaemonController::GetVersion() method on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698