[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.0-testing] stubdom: Fix stubdom-dm using "grep" improperly
# HG changeset patch # User John Weekes <lists.xen@xxxxxxxxxxxxxxxxxx> # Date 1294992288 0 # Node ID ea4acac90cfeb730e54fbcf5af06fe63fbfa3df6 # Parent 7a203c60d588a7a15a28a6fb16c69feafd157e0d stubdom: Fix stubdom-dm using "grep" improperly stubdom-dm uses "grep" on "xm list" output to determine whether it is already running. The existing behavior is to use "grep $domname-dm" but this will result in a false-positive in the case of another domU running whose name ends with the full new name; for instance, if "abctest-dm" is running, a new "test-dm" will spin forever, waiting for it the end. Any easy fix is to have it use "grep -w" instead of "grep", searching for the whole word only. It also might be worth considering a switch to "xl list" from "xm list", here and in other places. Signed-off-by: John Weekes <lists.xen@xxxxxxxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> xen-unstable changeset: 22714:6852e3e7ef58 xen-unstable date: Tue Jan 11 16:42:41 2011 +0000 --- stubdom/stubdom-dm | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -r 7a203c60d588 -r ea4acac90cfe stubdom/stubdom-dm --- a/stubdom/stubdom-dm Tue Jan 11 10:41:01 2011 +0000 +++ b/stubdom/stubdom-dm Fri Jan 14 08:04:48 2011 +0000 @@ -91,7 +91,7 @@ trap term SIGHUP ############ # stubdomain # Wait for any previous stubdom to terminate -while xm list | grep $domname-dm +while xm list | grep -w $domname-dm do sleep 1 done _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |