From 1dd9f0747eb15f333765ac74e1309ba6d4d3017f Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 7 Sep 2016 19:41:54 -0600 Subject: [PATCH 1/4] add gateway to interface configuration pi-hole@9cb4e8b broke #593 original commit 8550b76 --- automated install/basic-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 0caa8bf7..3963b6ef 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -358,6 +358,7 @@ setStaticIPv4() { ${SUDO} echo "ONBOOT=yes" >> ${IFCFG_FILE} ${SUDO} echo "IPADDR=$IPADDR" >> ${IFCFG_FILE} ${SUDO} echo "PREFIX=$CIDR" >> ${IFCFG_FILE} + ${SUDO} echo "GATEWAY=$IPv4gw" >> ${IFCFG_FILE} ${SUDO} echo "USERCTL=no" >> ${IFCFG_FILE} ${SUDO} ip addr replace dev "$piholeInterface" "$IPv4addr" if [ -x "$(command -v nmcli)" ];then From 05ad4445b54ded54b60f10b543428878a1277bbf Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 7 Sep 2016 19:58:35 -0600 Subject: [PATCH 2/4] add dns to sysconfig interface configuration --- automated install/basic-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 3963b6ef..1356a002 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -359,6 +359,8 @@ setStaticIPv4() { ${SUDO} echo "IPADDR=$IPADDR" >> ${IFCFG_FILE} ${SUDO} echo "PREFIX=$CIDR" >> ${IFCFG_FILE} ${SUDO} echo "GATEWAY=$IPv4gw" >> ${IFCFG_FILE} + ${SUDO} echo "DNS1=$piholeDNS1" >> ${IFCFG_FILE} + ${SUDO} echo "DNS2=$piholeDNS2" >> ${IFCFG_FILE} ${SUDO} echo "USERCTL=no" >> ${IFCFG_FILE} ${SUDO} ip addr replace dev "$piholeInterface" "$IPv4addr" if [ -x "$(command -v nmcli)" ];then From 6c0c6182e9979e87300ca8e2e25b7a48041db96c Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 7 Sep 2016 20:06:36 -0600 Subject: [PATCH 3/4] fix newline in configureSelinux stdout --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 1356a002..9f31100b 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -871,9 +871,9 @@ configureSelinux() { printf "::: Enabling httpd server side includes (SSI).. " ${SUDO} setsebool -P httpd_ssi_exec on if [ $? -eq 0 ]; then - echo -n "Success\n" + echo -n "Success" fi - printf ":::\tCompiling Pi-Hole SELinux policy..\n" + printf "\n:::\tCompiling Pi-Hole SELinux policy..\n" ${SUDO} checkmodule -M -m -o /etc/pihole/pihole.mod /etc/.pihole/advanced/selinux/pihole.te ${SUDO} semodule_package -o /etc/pihole/pihole.pp -m /etc/pihole/pihole.mod ${SUDO} semodule -i /etc/pihole/pihole.pp From 640af300cba4c032d55f9af7e5b2ea2fd6f0893c Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 7 Sep 2016 20:38:44 -0600 Subject: [PATCH 4/4] additional hostname checks in gravity.sh - Test if /etc/hostname exists before attempting to cat the file. - Add alternative hostname discovery via hostname command - Add an error message to stdout if unable to determine host fqdn --- gravity.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 0b1622e0..a1485acf 100755 --- a/gravity.sh +++ b/gravity.sh @@ -264,7 +264,13 @@ function gravity_unique() { function gravity_hostFormat() { # Format domain list as "192.168.x.x domain.com" echo "::: Formatting domains into a HOSTS file..." - hostname=$(