diff --git a/config/chroot_local-includes/usr/local/sbin/unsafe-browser b/config/chroot_local-includes/usr/local/sbin/unsafe-browser index 3ef32497361718d0a49d4561e66c9be4ae97ea07..0a0b6d457dcebab8ee4253a93b7b8ccd17db9663 100755 --- a/config/chroot_local-includes/usr/local/sbin/unsafe-browser +++ b/config/chroot_local-includes/usr/local/sbin/unsafe-browser @@ -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?