Change-Id: Ibe0840a74b9fe7fc0041ce92190cf82f25ae9298
Signed-off-by: Szilard Cserey <szilard.cserey@ericsson.com>
ip link set dev ${interface} up
sleep 5
link_state=$(ip link show ${interface} | grep -oP 'state \K[^ ]+')
ip link set dev ${interface} up
sleep 5
link_state=$(ip link show ${interface} | grep -oP 'state \K[^ ]+')
- if [[ ${link_state} != 'UP' ]]; then
+ if [[ ${link_state} == 'DOWN' ]]; then
echo "${red}Could not bring UP interface ${interface} link state is ${link_state}${reset}"
exit 1
fi
echo "${red}Could not bring UP interface ${interface} link state is ${link_state}${reset}"
exit 1
fi