From c976bbcfd238d7735059065f395b34731cb43b6d Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Sat, 1 Sep 2018 22:11:45 -0400 Subject: [PATCH] Fix checkout error due to readonly variable Signed-off-by: Mark Drobnak --- pihole | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pihole b/pihole index 4f76c98d..0d6a45ce 100755 --- a/pihole +++ b/pihole @@ -12,7 +12,12 @@ readonly PI_HOLE_SCRIPT_DIR="/opt/pihole" readonly gravitylist="/etc/pihole/gravity.list" readonly blacklist="/etc/pihole/black.list" -readonly setupVars="/etc/pihole/setupVars.conf" + +# setupVars is not readonly here because in some funcitons (checkout), +# it might get set again when the installer is sourced. This causes an +# error due to modifying a readonly variable. +setupVars="/etc/pihole/setupVars.conf" + readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE" source "${colfile}"