setup-ip: handle default conf if /qubes-mac returns empty value

This commit is contained in:
Frédéric Pierret (fepitre) 2019-05-21 17:32:05 +02:00
parent f7dd41206d
commit 27fddadc22
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -9,7 +9,7 @@ have_qubesdb || exit 0
mac="$(/usr/bin/qubesdb-read /qubes-mac 2> /dev/null)"
current_mac="$(get_mac_from_iface "$INTERFACE")"
if [ "$mac" = "$current_mac" ]; then
if [ "$mac" = "$current_mac" ] || [ "x$mac" = "x" ] ; then
ip="$(/usr/bin/qubesdb-read /qubes-ip 2> /dev/null)"
ip6="$(/usr/bin/qubesdb-read /qubes-ip6 2> /dev/null)"
if [ "x$ip" != x ]; then
@ -132,4 +132,4 @@ __EOF__
fi
fi
fi
fi
fi