From 994a9b8b11e1861bfd13c17a6efd20fb4663872d Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Wed, 7 Jul 2021 13:48:03 +0200 Subject: [PATCH] Use more explicit grep (thanks to @MichaIng) Signed-off-by: ChillerDragon --- 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 b9392c4d..a9295bd5 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -188,7 +188,7 @@ os_check() { local remote_os_domain valid_os valid_version valid_response detected_os detected_version display_warning cmdResult digReturnCode response remote_os_domain="versions.pi-hole.net" - detected_os=$(grep "\\bID\\b" /etc/os-release | cut -d '=' -f2 | tr -d '"') + detected_os=$(grep '^ID=' /etc/os-release | cut -d '=' -f2 | tr -d '"') detected_version=$(grep VERSION_ID /etc/os-release | cut -d '=' -f2 | tr -d '"') cmdResult="$(dig +short -t txt ${remote_os_domain} @ns1.pi-hole.net 2>&1; echo $?)"