Commit 8c45b567 authored by Tails developers's avatar Tails developers

Actually, only "source" the variable assignment we expect.

parent 7fc7e680
......@@ -100,11 +100,12 @@ if [ -r "${NM_ENV_FILE}" ]; then
# script. Note that while the regex used for deciding IP addresses
# is far from perfect, it serves our purpose here.
IP4_REGEX='[0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}'
if grep -v "^IP4_NAMESERVERS=\"${IP4_REGEX}\"$" "${NM_ENV_FILE}"; then
NAMESERVERS_REGEX="^IP4_NAMESERVERS=\"${IP4_REGEX}\"$"
if grep -v "${NAMESERVERS_REGEX}" "${NM_ENV_FILE}"; then
error "`gettext \"NetworkManager passed us garbage data when trying to deduce the clearnet DNS server.\"`"
fi
# Import the IP4_NAMESERVERS variable.
. "${NM_ENV_FILE}"
eval "$(grep "${NAMESERVERS_REGEX}" "${NM_ENV_FILE}")"
fi
# ... otherwise fail.
# FIXME: Or would it make sense to fallback to Google's DNS or OpenDNS?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment