ncsid: update_ra_gw: Fix old_rtr check
An iteration of a previous commit changed the default value of `old_rtr`
from empty string to explicitly `invalid`. We need to use the correct
comparison for early router setting.
Change-Id: I27c198a93cf06622c6fc6f01092f12d72e05f722
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/subprojects/ncsid/src/update_ra_gw.sh b/subprojects/ncsid/src/update_ra_gw.sh
index 371a7cc..faf7a15 100644
--- a/subprojects/ncsid/src/update_ra_gw.sh
+++ b/subprojects/ncsid/src/update_ra_gw.sh
@@ -104,7 +104,7 @@
# We have some notoriously noisy lab environments with many routers being broadcast
# We always prefer "fe80::1" in prod and labs for routing, so prefer that gateway.
# We also want to take the first router we find to speed up acquisition on boot.
- if [ "$rtr" = "fe80::1" -o -z "$old_rtr" ]; then
+ if [ "$rtr" = "fe80::1" -o "$old_rtr" = "invalid" ]; then
set_rtr || true
fi
fi