From e4cbf5023a811c2dd7b073ea109978f088e6fe86 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 30 Sep 2018 18:09:59 -0400 Subject: [PATCH 1/5] Fix error when reading in new password Signed-off-by: Mcat12 --- advanced/Scripts/webpage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 86dbeb70..cba7af00 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -110,7 +110,7 @@ SetWebPassword() { # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed. # So we reset the terminal via stty if the user does press Ctrl+C trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT - read -s -p -r "Enter New Password (Blank for no password): " PASSWORD + read -s -p "Enter New Password (Blank for no password): " PASSWORD echo "" if [ "${PASSWORD}" == "" ]; then @@ -119,7 +119,7 @@ SetWebPassword() { exit 0 fi - read -s -p -r "Confirm Password: " CONFIRM + read -s -p "Confirm Password: " CONFIRM echo "" fi From 7c6eecc9c85934dedf6c085218f62adbcb6ddf05 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 30 Sep 2018 18:16:08 -0400 Subject: [PATCH 2/5] Ignore shellcheck warning Signed-off-by: Mcat12 --- advanced/Scripts/webpage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index cba7af00..128d4d97 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -110,6 +110,7 @@ SetWebPassword() { # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed. # So we reset the terminal via stty if the user does press Ctrl+C trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT + # shellcheck disable=SC2162 read -s -p "Enter New Password (Blank for no password): " PASSWORD echo "" @@ -119,6 +120,7 @@ SetWebPassword() { exit 0 fi + # shellcheck disable=SC2162 read -s -p "Confirm Password: " CONFIRM echo "" fi From 3d4fea65108100772ba1b49c1c5a4c3aadfdbb94 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 26 Oct 2018 19:17:49 +0100 Subject: [PATCH 3/5] Move -r to before the -p Signed-off-by: Adam Warner --- advanced/Scripts/webpage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 128d4d97..035bca18 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -111,7 +111,7 @@ SetWebPassword() { # So we reset the terminal via stty if the user does press Ctrl+C trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT # shellcheck disable=SC2162 - read -s -p "Enter New Password (Blank for no password): " PASSWORD + read -s -r -p "Enter New Password (Blank for no password): " PASSWORD echo "" if [ "${PASSWORD}" == "" ]; then @@ -121,7 +121,7 @@ SetWebPassword() { fi # shellcheck disable=SC2162 - read -s -p "Confirm Password: " CONFIRM + read -s -r -p "Confirm Password: " CONFIRM echo "" fi From d57f9906bd124c5668f07b482d34cde8c658c672 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 26 Oct 2018 19:24:43 +0100 Subject: [PATCH 4/5] read -r -a, not read -a -r Signed-off-by: Adam Warner --- advanced/Scripts/piholeDebug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 022265fd..dcbd5861 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -907,7 +907,7 @@ parse_file() { #shellcheck disable=SC2016 IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )' else - read -a -r file_info <<< "$filename" + read -r -a file_info <<< "$filename" fi # Set a named variable for better readability local file_lines From 72829be281b073307438c25ec8d2cc3d76f18b80 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Fri, 26 Oct 2018 12:14:10 -0700 Subject: [PATCH 5/5] Remove shellcheck overrides Signed-off-by: Dan Schaper --- advanced/Scripts/webpage.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 035bca18..14d80355 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -110,7 +110,6 @@ SetWebPassword() { # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed. # So we reset the terminal via stty if the user does press Ctrl+C trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT - # shellcheck disable=SC2162 read -s -r -p "Enter New Password (Blank for no password): " PASSWORD echo "" @@ -120,7 +119,6 @@ SetWebPassword() { exit 0 fi - # shellcheck disable=SC2162 read -s -r -p "Confirm Password: " CONFIRM echo "" fi