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

Unified Diff: start_devserver

Issue 2817049: add boolean flag to start_devserver to support requests from update_engine (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: start_devserver
diff --git a/start_devserver b/start_devserver
index 908dc2eb432af64177d3639ebd04ba9b279f588c..f82b2cd25de1a945c8b8b541099ea5c9f2600ae8 100755
--- a/start_devserver
+++ b/start_devserver
@@ -6,8 +6,7 @@
# Start the Dev Server after making sure we are running under a chroot.
-COMMON_SH="$(dirname "$0")/common.sh"
-. "$COMMON_SH"
+. "$(dirname "$0")/common.sh"
# Script must be run inside the chroot if not in 'always serve' mode.
if [[ "$1" != "--archive_dir" ]]
@@ -15,4 +14,23 @@ then
restart_in_chroot_if_needed $*
fi
-cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py $*
+# Temporary workaround to support requests from update_engine daemon
+DEFINE_boolean update_engine $FLAGS_FALSE \
+ "Start devserver to handle update_engine requests. Default: False"
+
+# Parse command line.
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+set -e
+
+CLIENT_PREFIX=
+if [ "${FLAGS_update_engine}" -eq "${FLAGS_TRUE}" ] ; then
+ echo "!!! devserver will only handle request from update_engine"
+ # --client_prefix flag is defined in devserver.py
+ CLIENT_PREFIX="--client_prefix ChromeOSUpdateEngine"
+else
+ echo "!!! devserver will only handle request from memento_updater"
+fi
+
+cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py ${CLIENT_PREFIX} $*
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698