From e24668f99a053d2073de80fe2d0dc8c5d73d2cbc Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 7 Mar 2015 22:39:32 +0100 Subject: [PATCH] networking/red.up/99-geoip-database: Fix empty folder check. --- .../init.d/networking/red.up/99-geoip-database | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/initscripts/init.d/networking/red.up/99-geoip-database b/src/initscripts/init.d/networking/red.up/99-geoip-database index c79eda15d5..4bd3ee2ab7 100644 --- a/src/initscripts/init.d/networking/red.up/99-geoip-database +++ b/src/initscripts/init.d/networking/red.up/99-geoip-database @@ -2,14 +2,17 @@ # Get the GeoIP database if no one exists yet. -DIR=/usr/share/xt_geoip +DIR="/usr/share/xt_geoip/*" found=false # Check if the directory contains any data. -for i in $DIR/*; do - found=true - break +for i in $DIR; do + # Ignore "." and ".." + if [ -d "$i" ]; then + found=true + break + fi done # Download ruleset if none has been found. -- 2.39.5