A few misc fixes to the rpm server.
* Add #!/usr/bin/python and +x to scripts that should be executable
* Modify rpm_config.ini to set frontend_addr to 0.0.0.0
* Update dns_zone to be cros.corp.google.com
* Automatically create the logging dir if it doesn't exist
* Print usage if any arguments are specified on the cmdline.
TEST=unittests and local runs
BUG=chromium-os:34662,chromium-os:32525,chromium-os:32698
STATUS=Fixed
Change-Id: I88fa52c5e76e6dd589c6d91deb4af373c9262dc1
Reviewed-on: https://gerrit.chromium.org/gerrit/33792
Commit-Ready: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
diff --git a/site_utils/rpm_control_system/frontend_server.py b/site_utils/rpm_control_system/frontend_server.py
old mode 100644
new mode 100755
index 1a7a7d3..1a50e97
--- a/site_utils/rpm_control_system/frontend_server.py
+++ b/site_utils/rpm_control_system/frontend_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -6,6 +7,7 @@
import heapq
import logging
import re
+import sys
import socket
import threading
import xmlrpclib
@@ -256,6 +258,9 @@
Main function used to launch the frontend server. Creates an instance of
RPMFrontendServer and registers it to a MultiThreadedXMLRPCServer instance.
"""
+ if len(sys.argv) > 1:
+ print 'Usage: ./%s, no arguments available.' % sys.argv[0]
+ sys.exit(1)
rpm_logging_config.set_up_logging(LOG_FILENAME_FORMAT)
frontend_server = RPMFrontendServer()
address = rpm_config.get('RPM_INFRASTRUCTURE', 'frontend_addr')