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

Unified Diff: bin/cros_stop_vm

Issue 5988006: Add new script to stop a kvm using vm library and use in harness. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix docstring Created 10 years 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_au_test_harness.py ('k') | lib/cros_vm_lib.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_stop_vm
diff --git a/bin/cros_stop_vm b/bin/cros_stop_vm
new file mode 100755
index 0000000000000000000000000000000000000000..84fa56c29152abb1375a01c528f4d0fbe747ab19
--- /dev/null
+++ b/bin/cros_stop_vm
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Simple wrapper scipt to stop a vm specified from a pid file.
+
+. "$(dirname $0)/../common.sh"
+. "$(dirname $0)/../lib/cros_vm_lib.sh"
+
+set -e
+
+# Parse command line.
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+# Requires pid file to be set.
+if [ -z "${FLAGS_kvm_pid}" ]; then
+ die "Must specify file with pid of kvm to kill."
+fi
+
+KVM_PID_FILE="${FLAGS_kvm_pid}"
+stop_kvm
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | lib/cros_vm_lib.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698