mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Refine image_to_live script to log all output from devserver.
Review URL: http://codereview.chromium.org/1572034
This commit is contained in:
parent
ba9682ac08
commit
ac2de13847
@ -18,6 +18,8 @@ DEFINE_boolean ignore_hostname ${FLAGS_TRUE} \
|
|||||||
"Ignore existing AU hostname on running instance use this hostname"
|
"Ignore existing AU hostname on running instance use this hostname"
|
||||||
DEFINE_boolean update_known_hosts ${FLAGS_FALSE} \
|
DEFINE_boolean update_known_hosts ${FLAGS_FALSE} \
|
||||||
"Update your known_hosts with the new remote instance's key"
|
"Update your known_hosts with the new remote instance's key"
|
||||||
|
DEFINE_boolean verbose ${FLAGS_FALSE} \
|
||||||
|
"Whether to output verbose information for debugging."
|
||||||
|
|
||||||
function kill_all_devservers {
|
function kill_all_devservers {
|
||||||
# Using ! here to avoid exiting with set -e is insufficient, so use
|
# Using ! here to avoid exiting with set -e is insufficient, so use
|
||||||
@ -38,7 +40,11 @@ function remote_reboot_sh {
|
|||||||
|
|
||||||
function start_dev_server {
|
function start_dev_server {
|
||||||
kill_all_devservers
|
kill_all_devservers
|
||||||
|
if [ ${FLAGS_verbose} -eq ${FLAGS_FALSE} ]; then
|
||||||
./enter_chroot.sh "./start_devserver > /dev/null 2>&1" &
|
./enter_chroot.sh "./start_devserver > /dev/null 2>&1" &
|
||||||
|
else
|
||||||
|
./enter_chroot.sh "./start_devserver" &
|
||||||
|
fi
|
||||||
echo -n "Waiting on devserver to start"
|
echo -n "Waiting on devserver to start"
|
||||||
until netstat -anp 2>&1 | grep 8080 > /dev/null; do
|
until netstat -anp 2>&1 | grep 8080 > /dev/null; do
|
||||||
sleep .5
|
sleep .5
|
||||||
@ -169,7 +175,7 @@ function main() {
|
|||||||
|
|
||||||
if ! run_auto_update; then
|
if ! run_auto_update; then
|
||||||
echo "Update was not successful."
|
echo "Update was not successful."
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remote_reboot
|
remote_reboot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user