From f45eb84d6bbb8946c01315812bbd1631ad685c29 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 14 Jul 2016 11:27:47 -0700 Subject: [PATCH 1/3] Add distribution Check --- advanced/Scripts/piholeDebug.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index dfe9f4ac..8d0d3fa7 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -67,6 +67,14 @@ function versionCheck { echo >> $DEBUG_LOG } +function distroCheck { + echo "#######################################" >> $DEBUG_LOG + echo "######## Distribution Section #########" >> $DEBUG_LOG + echo "#######################################" >> $DEBUG_LOG + + TMP=$(cat /etc/lsb-release/ || echo "Failed to find lsb") + echo "Distribution Version: $TMP" >> $DEBUG_LOG + function compareWhitelist { if [ ! -f "$WHITELISTMATCHES" ]; then $SUDO touch $WHITELISTMATCHES @@ -195,6 +203,7 @@ echo "$GATEWAY_CHECK" >> $DEBUG_LOG echo >> $DEBUG_LOG versionCheck +distroCheck compareWhitelist compareBlacklist testNslookup From b011e5f838e74e808856a426fa11b2cfc08339cb Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 14 Jul 2016 11:35:52 -0700 Subject: [PATCH 2/3] Add os-release check --- 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 8d0d3fa7..86bff3c2 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -72,7 +72,7 @@ function distroCheck { echo "######## Distribution Section #########" >> $DEBUG_LOG echo "#######################################" >> $DEBUG_LOG - TMP=$(cat /etc/lsb-release/ || echo "Failed to find lsb") + TMP=$(cat /etc/lsb-release/ || cat /etc/os-release || echo "Failed to find release") echo "Distribution Version: $TMP" >> $DEBUG_LOG function compareWhitelist { From 11f2524b9b2d8ad2a4d423d00dc37727c91803de Mon Sep 17 00:00:00 2001 From: Sander Date: Thu, 14 Jul 2016 20:47:27 +0200 Subject: [PATCH 3/3] Instead of an or, cat *release --- 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 86bff3c2..fdb7847d 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -72,7 +72,7 @@ function distroCheck { echo "######## Distribution Section #########" >> $DEBUG_LOG echo "#######################################" >> $DEBUG_LOG - TMP=$(cat /etc/lsb-release/ || cat /etc/os-release || echo "Failed to find release") + TMP=$(cat /etc/*release/ || echo "Failed to find release") echo "Distribution Version: $TMP" >> $DEBUG_LOG function compareWhitelist {