dm:add grep -w option for uos launch sh

for vm_name  with vxworks_vm1  or zephyr_vm1 or vm1
grep "vm1" will match three of them, add -w option fix this issue
Tracked-On:#3081
Signed-off-by: zhangyun <yunx.zhang@intel.com>
This commit is contained in:
lijianpi 2019-05-08 10:03:48 +08:00 committed by ACRN System Integration
parent 4c28a37440
commit d9717967d7
5 changed files with 7 additions and 7 deletions

View File

@ -75,7 +75,7 @@ fi
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit
@ -223,7 +223,7 @@ ser=$mmc_name$mmc_serial
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit

View File

@ -64,7 +64,7 @@ fi
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit
@ -208,7 +208,7 @@ ser=$mmc_name$mmc_serial
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit

View File

@ -15,7 +15,7 @@ mac_seed=${mac:9:8}-${vm_name}
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit

View File

@ -6,7 +6,7 @@ vm_name=vxworks_vm$1
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit

View File

@ -6,7 +6,7 @@ vm_name=zephyr_vm$1
#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
result=$(echo $vm_ps | grep -w "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit