Add $ to avoid h1 matching h10
This commit is contained in:
@@ -9,7 +9,7 @@ else
|
|||||||
host=$1
|
host=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pid=`ps ax | grep mininet:$host | grep bash | awk '{print $1};'`
|
pid=`ps ax | grep "mininet:$host$" | grep bash | awk '{print $1};'`
|
||||||
|
|
||||||
if echo $pid | grep -q ' '; then
|
if echo $pid | grep -q ' '; then
|
||||||
echo "Error: found multiple mininet:$host processes"
|
echo "Error: found multiple mininet:$host processes"
|
||||||
|
|||||||
Reference in New Issue
Block a user