1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add tests for empty values

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-04-13 10:22:47 +02:00
parent c142a07ffa
commit 19a4fc8253
3 changed files with 8 additions and 8 deletions

View file

@ -238,7 +238,7 @@ while true; do
OMR_TRACKER_DEVICE_GATEWAY6=
serverip_ping=false
if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
if [ -n "$OMR_TRACKER_DEVICE" ] && [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep UP)" ]; then
# retrieve iface ip and gateway
if [ "$OMR_TRACKER_INTERFACE_PROTO" != "dhcpv6" ]; then