From 1d8ea9e8693b4a1a38a1cf45516ce032c1130a1d Mon Sep 17 00:00:00 2001 From: bcambl Date: Sun, 22 Apr 2018 13:53:15 -0600 Subject: [PATCH 1/2] Fix static IP checking on Fedora This bug was introduced by #1758 where the CIDR was removed from the static IP check. The CIDR was acting as a boundary so we need to test for a boundary or a slash character. Signed-off-by: bcambl --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c473d0c9..2da8e785 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -689,7 +689,7 @@ setStaticIPv4() { IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE} IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/) # check if the desired IP is already set - if grep -q "${IPADDR}" "${IFCFG_FILE}"; then + if grep -Eq "${IPADDR}(\\b|\\/)" "${IFCFG_FILE}"; then echo -e " ${INFO} Static IP already configured" # Otherwise, else From 0c8a32b9ae3fdada94839f065e9816a16b8c09eb Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 29 Apr 2018 18:27:10 +0100 Subject: [PATCH 2/2] No need to stop services This causes issues on a `pihole -r reconfigure` Signed-off-by: Adam Warner --- automated install/basic-install.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e8901193..7a031466 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2113,23 +2113,6 @@ main() { welcomeDialogs # Create directory for Pi-hole storage mkdir -p /etc/pihole/ - - #Do we need to stop pihole-FTL or dnsmasq(if coming from an old install)? - if [[ $(which pihole-FTL 2>/dev/null) ]]; then - if pihole-FTL --resolver > /dev/null; then - stop_service pihole-FTL - else - stop_service dnsmasq - fi - else - if [[ $(which dnsmasq 2>/dev/null) ]]; then - stop_service dnsmasq - fi - fi - - if [[ "${INSTALL_WEB_SERVER}" == true ]]; then - stop_service lighttpd - fi # Determine available interfaces get_available_interfaces # Find interfaces and let the user choose one