OLD | NEW |
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 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
10 | 10 |
11 # 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. |
12 if [[ "$1" != "--archive_dir" ]] | 12 if [[ "$1" != "--archive_dir" ]] |
13 then | 13 then |
14 restart_in_chroot_if_needed $* | 14 restart_in_chroot_if_needed $* |
15 fi | 15 fi |
16 | 16 |
17 # Temporary workaround to support requests from update_engine daemon | 17 # Temporary workaround: to start devserver for update engine, pass in args |
18 DEFINE_boolean update_engine $FLAGS_FALSE \ | 18 # --client_prefix ChromeOSUpdateEngine |
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 | 19 |
36 # Set PKG_INSTALL_MASK if it's not set already. | 20 # Set PKG_INSTALL_MASK if it's not set already. |
37 if [ -z "${PKG_INSTALL_MASK+x}" ]; then | 21 if [ -z "${PKG_INSTALL_MASK+x}" ]; then |
38 export PKG_INSTALL_MASK="${DEFAULT_INSTALL_MASK}" | 22 export PKG_INSTALL_MASK="${DEFAULT_INSTALL_MASK}" |
39 fi | 23 fi |
40 echo PKG_INSTALL_MASK=$PKG_INSTALL_MASK | 24 echo PKG_INSTALL_MASK=$PKG_INSTALL_MASK |
41 | 25 |
42 cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py ${CLIENT_PREFIX} $* | 26 cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py $* |
OLD | NEW |