mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Merge pull request #1133 from pi-hole/fix/gravity_collapse
Make sure to read all lines of adlists file
This commit is contained in:
commit
d8bcbdadd6
@ -76,7 +76,7 @@ gravity_collapse() {
|
|||||||
#custom file found, use this instead of default
|
#custom file found, use this instead of default
|
||||||
echo -n "::: Custom adList file detected. Reading..."
|
echo -n "::: Custom adList file detected. Reading..."
|
||||||
sources=()
|
sources=()
|
||||||
while read -r line; do
|
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||||
#Do not read commented out or blank lines
|
#Do not read commented out or blank lines
|
||||||
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
|
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
|
||||||
echo "" > /dev/null
|
echo "" > /dev/null
|
||||||
@ -89,7 +89,7 @@ gravity_collapse() {
|
|||||||
#no custom file found, use defaults!
|
#no custom file found, use defaults!
|
||||||
echo -n "::: No custom adlist file detected, reading from default file..."
|
echo -n "::: No custom adlist file detected, reading from default file..."
|
||||||
sources=()
|
sources=()
|
||||||
while read -r line; do
|
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||||
#Do not read commented out or blank lines
|
#Do not read commented out or blank lines
|
||||||
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
|
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
|
||||||
echo "" > /dev/null
|
echo "" > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user