Leave the loop once we match

This commit is contained in:
Kaladin Light 2017-02-05 14:30:31 -05:00
parent faaabe4c0e
commit 752d0cc3af

View file

@ -86,10 +86,11 @@ fi
while read -r line || [ -n "${line}" ]; do
STATUS=$(echo "$line" | awk '{print $1}')
if [[ "${STATUS}" = "V" ]]; then
if [ "${STATUS}" == "V" ]; then
CERT=$(echo "$line" | sed -e 's:.*/CN=::')
if [ "${CERT}" == "${NAME}" ]; then
INUSE="1"
break
fi
fi
done <${INDEX}