mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Always process DNS and DHCP settings in installer (#1630)
* Always process DNS and DHCP settings in installer * Make sure dnsmasq config exists before modifying it Signed-off-by: Mcat12 <newtoncat12@yahoo.com> * Make sure the dnsmasq config directory exists Signed-off-by: Mcat12 <newtoncat12@yahoo.com> * Only remove the DHCP config if it exists (fixes tests, hopefully) Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
c02a24cf71
commit
b09c660833
3 changed files with 8 additions and 9 deletions
|
@ -292,8 +292,10 @@ ra-param=*,0,0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
if [[ -f "${dhcpconfig}" ]]; then
|
||||||
rm "${dhcpconfig}" &> /dev/null
|
rm "${dhcpconfig}" &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
EnableDHCP() {
|
EnableDHCP() {
|
||||||
|
|
|
@ -1503,16 +1503,11 @@ finalExports() {
|
||||||
source "${setupVars}"
|
source "${setupVars}"
|
||||||
source "${PI_HOLE_LOCAL_REPO}/advanced/Scripts/webpage.sh"
|
source "${PI_HOLE_LOCAL_REPO}/advanced/Scripts/webpage.sh"
|
||||||
|
|
||||||
if [[ "${DNS_FQDN_REQUIRED}" != "" ]] ; then
|
|
||||||
# Look for DNS server settings which would have to be reapplied
|
# Look for DNS server settings which would have to be reapplied
|
||||||
ProcessDNSSettings
|
ProcessDNSSettings
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${DHCP_ACTIVE}" != "" ]] ; then
|
|
||||||
# Look for DHCP server settings which would have to be reapplied
|
# Look for DHCP server settings which would have to be reapplied
|
||||||
ProcessDHCPSettings
|
ProcessDHCPSettings
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install the logrotate script
|
# Install the logrotate script
|
||||||
|
|
|
@ -59,6 +59,8 @@ def test_setupVars_saved_to_file(Pihole):
|
||||||
TERM=xterm
|
TERM=xterm
|
||||||
source /opt/pihole/basic-install.sh
|
source /opt/pihole/basic-install.sh
|
||||||
{}
|
{}
|
||||||
|
mkdir -p /etc/dnsmasq.d
|
||||||
|
version_check_dnsmasq
|
||||||
finalExports
|
finalExports
|
||||||
cat /etc/pihole/setupVars.conf
|
cat /etc/pihole/setupVars.conf
|
||||||
'''.format(set_setup_vars))
|
'''.format(set_setup_vars))
|
||||||
|
|
Loading…
Reference in a new issue