From fbe35471296856638b4f929c872fef72c67b01ab Mon Sep 17 00:00:00 2001 From: bcambl Date: Tue, 11 Oct 2016 00:01:11 -0600 Subject: [PATCH 1/4] EPEL is not required on Fedora epel-release installs the EPEL package repository (Extra Packages for Enterprise Linux) Dependencies from this repository should available by default on Fedora --- automated install/basic-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 945fa1e1..5c713030 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -99,6 +99,10 @@ elif [ -x "$(command -v rpm)" ];then PKG_COUNT="$PKG_MANAGER check-update | grep -v ^Last | grep -c ^[a-zA-Z0-9]" INSTALLER_DEPS=( iproute net-tools procps-ng newt git ) PIHOLE_DEPS=( epel-release bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-cli php curl unzip wget findutils cronie sudo nmap-ncat ) + if grep -q 'Fedora' /etc/redhat-release; then + remove_deps=(epel-release); + PIHOLE_DEPS=( ${PIHOLE_DEPS[@]/$remove_deps} ); + fi LIGHTTPD_USER="lighttpd" LIGHTTPD_GROUP="lighttpd" LIGHTTPD_CFG="lighttpd.conf.fedora" From e5ede16749e71b57587952c742493f6029a5f036 Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 12 Oct 2016 20:04:20 -0600 Subject: [PATCH 2/4] update yum/dnf package count grepfu see pull #774 --- 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 5c713030..7ca12943 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -96,7 +96,7 @@ elif [ -x "$(command -v rpm)" ];then UPDATE_PKG_CACHE="$PKG_MANAGER check-update" PKG_UPDATE="$PKG_MANAGER update -y" PKG_INSTALL="$PKG_MANAGER install -y" - PKG_COUNT="$PKG_MANAGER check-update | grep -v ^Last | grep -c ^[a-zA-Z0-9]" + PKG_COUNT="$PKG_MANAGER check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l" INSTALLER_DEPS=( iproute net-tools procps-ng newt git ) PIHOLE_DEPS=( epel-release bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-cli php curl unzip wget findutils cronie sudo nmap-ncat ) if grep -q 'Fedora' /etc/redhat-release; then From f4f8b967885dbe25b928c317fda630a11061bf92 Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 12 Oct 2016 20:08:22 -0600 Subject: [PATCH 3/4] remove systemd selinux rules on init systems fixes the failing SELinux policy compile on init based systems --- automated install/basic-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 7ca12943..2021cc9e 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -841,6 +841,9 @@ configureSelinux() { printf "::: Enabling httpd server side includes (SSI).. " setsebool -P httpd_ssi_exec on &> /dev/null && echo "Success" || echo "SELinux not enabled" printf "\n:::\tCompiling Pi-Hole SELinux policy..\n" + if ! [ -x "$(command -v systemctl)" ]; then + sed -i.bak '/systemd/d' /etc/.pihole/advanced/selinux/pihole.te + fi checkmodule -M -m -o /etc/pihole/pihole.mod /etc/.pihole/advanced/selinux/pihole.te semodule_package -o /etc/pihole/pihole.pp -m /etc/pihole/pihole.mod semodule -i /etc/pihole/pihole.pp From 26202014a28bbfa58cf2bc15b87cad4d98c1095a Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 12 Oct 2016 20:23:12 -0600 Subject: [PATCH 4/4] stdout formatting --- automated install/basic-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2021cc9e..752a0a1a 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -838,7 +838,7 @@ configureSelinux() { printf ":::\tChecking for SELinux policy development packages..." package_check_install "selinux-policy-devel" > /dev/null echo " installed!" - printf "::: Enabling httpd server side includes (SSI).. " + printf ":::\tEnabling httpd server side includes (SSI).. " setsebool -P httpd_ssi_exec on &> /dev/null && echo "Success" || echo "SELinux not enabled" printf "\n:::\tCompiling Pi-Hole SELinux policy..\n" if ! [ -x "$(command -v systemctl)" ]; then @@ -954,13 +954,13 @@ if [[ ${useUpdateVars} == false ]]; then displayFinalMessage fi -echo -n "::: Restarting services..." +echo "::: Restarting services..." # Start services start_service dnsmasq enable_service dnsmasq start_service lighttpd enable_service lighttpd -echo " done." +echo "::: done." echo ":::" if [[ ${useUpdateVars} == false ]]; then