diff options
author | John Weekes <lists.xen@nuclearfallout.net> | 2011-01-11 16:42:41 +0000 |
---|---|---|
committer | John Weekes <lists.xen@nuclearfallout.net> | 2011-01-11 16:42:41 +0000 |
commit | 1676d94292f97fa86fcafa6348ac57d12c270054 (patch) | |
tree | ed8d9c40a168ce6ea8d1702d7ec45421c176648b /stubdom | |
parent | b3c8bef7a7f9f0e5164f9efae638685e2964a243 (diff) | |
download | xen-1676d94292f97fa86fcafa6348ac57d12c270054.tar.gz xen-1676d94292f97fa86fcafa6348ac57d12c270054.tar.bz2 xen-1676d94292f97fa86fcafa6348ac57d12c270054.zip |
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@nuclearfallout.net>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'stubdom')
-rw-r--r-- | stubdom/stubdom-dm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stubdom/stubdom-dm b/stubdom/stubdom-dm index c85fa53635..05d07ac0d1 100644 --- a/stubdom/stubdom-dm +++ b/stubdom/stubdom-dm @@ -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 |