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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Start the Dev Server after making sure we are running under a chroot. 7 # Start the Dev Server after making sure we are running under a chroot.
8 8
9 COMMON_SH="$(dirname "$0")/common.sh" 9 . "$(dirname "$0")/common.sh"
10 . "$COMMON_SH"
11 10
12 # Script must be run inside the chroot if not in 'always serve' mode. 11 # Script must be run inside the chroot if not in 'always serve' mode.
13 if [[ "$1" != "--archive_dir" ]] 12 if [[ "$1" != "--archive_dir" ]]
14 then 13 then
15 restart_in_chroot_if_needed $* 14 restart_in_chroot_if_needed $*
16 fi 15 fi
17 16
18 cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py $* 17 # Temporary workaround to support requests from update_engine daemon
18 DEFINE_boolean update_engine $FLAGS_FALSE \
19 "Start devserver to handle update_engine requests. Default: False"
20
21 # Parse command line.
22 FLAGS "$@" || exit 1
23 eval set -- "${FLAGS_ARGV}"
24
25 set -e
26
27 CLIENT_PREFIX=
28 if [ "${FLAGS_update_engine}" -eq "${FLAGS_TRUE}" ] ; then
29 echo "!!! devserver will only handle request from update_engine"
30 # --client_prefix flag is defined in devserver.py
31 CLIENT_PREFIX="--client_prefix ChromeOSUpdateEngine"
32 else
33 echo "!!! devserver will only handle request from memento_updater"
34 fi
35
36 cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py ${CLIENT_PREFIX} $*
OLDNEW
« 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