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

Unified Diff: lib/cros_vm_lib.sh

Issue 3628002: Add a simple wrapper script around vm lib to start a vm. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Add echo Created 10 years, 2 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 | « bin/cros_start_vm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cros_vm_lib.sh
diff --git a/lib/cros_vm_lib.sh b/lib/cros_vm_lib.sh
index 8f98926ccc9e8de2ebd5559ee8d1756fb79640a9..f36804d378b4545c4398ec40f5a8e8977eec212f 100644
--- a/lib/cros_vm_lib.sh
+++ b/lib/cros_vm_lib.sh
@@ -28,15 +28,15 @@ function start_kvm() {
local pid=$(get_pid)
# Check if the process exists.
if ps -p ${pid} > /dev/null ; then
- echo "Using a pre-created KVM instance specified by ${FLAGS_kvm_pid}."
+ echo "Using a pre-created KVM instance specified by ${FLAGS_kvm_pid}." >&2
else
# Let's be safe in case they specified a file that isn't a pid file.
- echo "File ${KVM_PID_FILE} exists but specified pid doesn't."
+ echo "File ${KVM_PID_FILE} exists but specified pid doesn't." >&2
exit 1
fi
else
# No pid specified by PID file. Let's create a VM instance in this case.
- echo "Starting a KVM instance"
+ echo "Starting a KVM instance" >&2
local nographics=""
local usesnapshot=""
if [ ${FLAGS_no_graphics} -eq ${FLAGS_TRUE} ]; then
@@ -65,7 +65,7 @@ function start_kvm() {
function ssh_ping() {
"$(dirname $0)"/../ssh_test.sh \
--ssh_port=${FLAGS_ssh_port} \
- --remote=127.0.0.1
+ --remote=127.0.0.1 >&2
}
# Tries to ssh into live image $1 times. After first failure, a try involves
@@ -88,12 +88,12 @@ function retry_until_ssh() {
function stop_kvm() {
if [ "${FLAGS_persist}" -eq "${FLAGS_TRUE}" ]; then
echo "Persist requested. Use --ssh_port ${FLAGS_ssh_port} " \
- "--kvm_pid ${KVM_PID_FILE} to re-connect to it."
+ "--kvm_pid ${KVM_PID_FILE} to re-connect to it." >&2
else
echo "Stopping the KVM instance" >&2
local pid=$(get_pid)
if [ -n "${pid}" ]; then
- echo "Killing ${pid}"
+ echo "Killing ${pid}" >&2
sudo kill ${pid}
sudo rm "${KVM_PID_FILE}"
else
« no previous file with comments | « bin/cros_start_vm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698