Better use '-z' and '-n' for readibility
This commit is contained in:
parent
967060eb32
commit
cf03ae3e2a
@ -172,25 +172,25 @@ if [ -n "$INTERFACE" ]; then
|
|||||||
|
|
||||||
# Handle legacy values
|
# Handle legacy values
|
||||||
LEGACY_MAC="$(/usr/bin/qubesdb-read /qubes-mac 2> /dev/null)"
|
LEGACY_MAC="$(/usr/bin/qubesdb-read /qubes-mac 2> /dev/null)"
|
||||||
if [ "$MAC" == "$LEGACY_MAC" ] || [ "x$LEGACY_MAC" == "x" ]; then
|
if [ "$MAC" == "$LEGACY_MAC" ] || [ -z "$LEGACY_MAC" ]; then
|
||||||
if [ "x$ip" == "x" ]; then
|
if [ -z "$ip" ]; then
|
||||||
ip="$(/usr/bin/qubesdb-read /qubes-ip 2> /dev/null)"
|
ip="$(/usr/bin/qubesdb-read /qubes-ip 2> /dev/null)"
|
||||||
fi
|
fi
|
||||||
if [ "$ip6" == "x" ]; then
|
if [ -z "$ip6" ]; then
|
||||||
ip6="$(/usr/bin/qubesdb-read /qubes-ip6 2> /dev/null)"
|
ip6="$(/usr/bin/qubesdb-read /qubes-ip6 2> /dev/null)"
|
||||||
fi
|
fi
|
||||||
if [ "$gateway" == "x" ]; then
|
if [ -z "$gateway" ]; then
|
||||||
gateway="$(/usr/bin/qubesdb-read /qubes-gateway)"
|
gateway="$(/usr/bin/qubesdb-read /qubes-gateway)"
|
||||||
fi
|
fi
|
||||||
if [ "x$gateway6" == "x" ]; then
|
if [ -z "$gateway6" ]; then
|
||||||
gateway6="$(/usr/bin/qubesdb-read /qubes-gateway6)"
|
gateway6="$(/usr/bin/qubesdb-read /qubes-gateway6)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$netmask" == "x" ]; then
|
if [ -z "$netmask" ]; then
|
||||||
netmask="255.255.255.255"
|
netmask="255.255.255.255"
|
||||||
fi
|
fi
|
||||||
if [ "x$netmask6" == "x" ]; then
|
if [ -z "$netmask6" ]; then
|
||||||
netmask6="128"
|
netmask6="128"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ if [ -n "$INTERFACE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
network=$(qubesdb-read /qubes-netvm-network 2>/dev/null)
|
network=$(qubesdb-read /qubes-netvm-network 2>/dev/null)
|
||||||
if [ "x$network" != "x" ]; then
|
if [ -n "$network" ]; then
|
||||||
if ! qsvc disable-dns-server; then
|
if ! qsvc disable-dns-server; then
|
||||||
configure_qubes_ns
|
configure_qubes_ns
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user