meta-google: gbmc-bridge: do not return an error when ignoring same ip
gbmc-br-dhcp will try to set the ip and will exit if an error is detect.
We should not return an error when ignoring the same ip so the netboot
can continue.
Change-Id: I64397fcd8cf0a5bc084b34b11aabcc381c889bda
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh
index 95516d6..eca1eec 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh
@@ -117,11 +117,11 @@
local old_ip=
if [ -n "$ip" ]; then
old_ip="$(cat /var/google/gbmc-br-ip 2>/dev/null)"
- [ "$old_ip" != "$ip" ] || return
+ [ "$old_ip" == "$ip" ] && return
mkdir -p /var/google || return
echo "$ip" >/var/google/gbmc-br-ip || return
else
- [ -f "/var/google/gbmc-br-ip" ] || return
+ [ ! -f "/var/google/gbmc-br-ip" ] && return
rm -rf /var/google/gbmc-br-ip
fi