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 c79eda15d..4bd3ee2ab 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.