From 38775cffdf6fb849643ffac1913e97b4d88e67f5 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 14 Nov 2022 22:51:39 +0000 Subject: [PATCH 1/4] Ensure local hash is always of length 8, for consistency. Signed-off-by: Adam Warner --- advanced/Scripts/updatecheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/updatecheck.sh b/advanced/Scripts/updatecheck.sh index 0ce9ad5d..0cc65218 100755 --- a/advanced/Scripts/updatecheck.sh +++ b/advanced/Scripts/updatecheck.sh @@ -22,7 +22,7 @@ function get_local_version() { function get_local_hash() { cd "${1}" 2> /dev/null || return 1 - git rev-parse --short HEAD || return 1 + git rev-parse --short=8 HEAD || return 1 } function get_remote_version() { From 6d8abc2e30aecc98c5807a3ec4a409f4b3568580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 18 Nov 2022 23:50:34 +0100 Subject: [PATCH 2/4] Don't install `which` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- 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 b9a6142b..841a04f4 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -360,7 +360,7 @@ package_manager_detect() { # CentOS package manager returns 100 when there are packages to update so we need to || true to prevent the script from exiting. PKG_COUNT="${PKG_MANAGER} check-update | grep -E '(.i686|.x86|.noarch|.arm|.src)' | wc -l || true" OS_CHECK_DEPS=(grep bind-utils) - INSTALLER_DEPS=(git dialog iproute newt procps-ng which chkconfig ca-certificates) + INSTALLER_DEPS=(git dialog iproute newt procps-ng chkconfig ca-certificates) PIHOLE_DEPS=(cronie curl findutils sudo unzip libidn2 psmisc libcap nmap-ncat jq) PIHOLE_WEB_DEPS=(lighttpd lighttpd-fastcgi php-common php-cli php-pdo php-xml php-json php-intl) LIGHTTPD_USER="lighttpd" From f3c27f706f3b2007b9cdbbab4747a4ff4834d8ed Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 23 Nov 2022 14:07:30 -0300 Subject: [PATCH 3/4] Pass only the correct argument Signed-off-by: RD WebDesign --- pihole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index aad83451..ed8eb856 100755 --- a/pihole +++ b/pihole @@ -425,7 +425,7 @@ tricorderFunc() { } updateCheckFunc() { - "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@" + "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$1" exit 0 } @@ -553,7 +553,7 @@ case "${1}" in "restartdns" ) restartDNS "$2";; "-a" | "admin" ) webpageFunc "$@";; "checkout" ) piholeCheckoutFunc "$@";; - "updatechecker" ) updateCheckFunc "$@";; + "updatechecker" ) updateCheckFunc "$2";; "arpflush" ) arpFunc "$@";; "-t" | "tail" ) tailFunc "$2";; esac From 233453267e20a3baedc350324daa73311a26c0ed Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 23 Nov 2022 15:33:49 -0300 Subject: [PATCH 4/4] Using `shift` to allow passing multiple arguments Signed-off-by: RD WebDesign --- pihole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index ed8eb856..ca80bff8 100755 --- a/pihole +++ b/pihole @@ -425,7 +425,7 @@ tricorderFunc() { } updateCheckFunc() { - "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$1" + "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@" exit 0 } @@ -553,7 +553,7 @@ case "${1}" in "restartdns" ) restartDNS "$2";; "-a" | "admin" ) webpageFunc "$@";; "checkout" ) piholeCheckoutFunc "$@";; - "updatechecker" ) updateCheckFunc "$2";; + "updatechecker" ) shift; updateCheckFunc "$@";; "arpflush" ) arpFunc "$@";; "-t" | "tail" ) tailFunc "$2";; esac