[08/12] update-location-database: Export database to ipset compatible format now.

Message ID 20220214184257.2406-8-stefan.schantl@ipfire.org
State Accepted
Commit edad13b46b864150f49dcb42580a4ebcf35ca3f0
Headers
Series [01/12] location-functions.pl: Rename and set the location for exported databases to "/var/lib/location/ipset/". |

Commit Message

Stefan Schantl Feb. 14, 2022, 6:42 p.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 src/scripts/update-location-database | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Peter Müller Feb. 14, 2022, 9:05 p.m. UTC | #1
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>

> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
>  src/scripts/update-location-database | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/scripts/update-location-database b/src/scripts/update-location-database
> index 06b22d101..d41a0a947 100644
> --- a/src/scripts/update-location-database
> +++ b/src/scripts/update-location-database
> @@ -42,8 +42,8 @@ fi
>  
>  # Get the latest location database from server.
>  if /usr/bin/location update --cron=$UPDATE_INTERVAL; then
> -	# Call location and export all countries in xt_geoip compatible format.
> -	if /usr/bin/location export --directory=/usr/share/xt_geoip --family=ipv4 --format=xt_geoip; then
> +	# Call location and export all countries in an ipset compatible format.
> +	if /usr/bin/location export --directory=/var/lib/location/ipset --family=ipv4 --format=ipset; then
>  
>  		# Call initscript to reload the firewall.
>  		/etc/init.d/firewall reload
  
Michael Tremer Feb. 15, 2022, 12:39 p.m. UTC | #2
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 14 Feb 2022, at 18:42, Stefan Schantl <stefan.schantl@ipfire.org> wrote:
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
> src/scripts/update-location-database | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/scripts/update-location-database b/src/scripts/update-location-database
> index 06b22d101..d41a0a947 100644
> --- a/src/scripts/update-location-database
> +++ b/src/scripts/update-location-database
> @@ -42,8 +42,8 @@ fi
> 
> # Get the latest location database from server.
> if /usr/bin/location update --cron=$UPDATE_INTERVAL; then
> -	# Call location and export all countries in xt_geoip compatible format.
> -	if /usr/bin/location export --directory=/usr/share/xt_geoip --family=ipv4 --format=xt_geoip; then
> +	# Call location and export all countries in an ipset compatible format.
> +	if /usr/bin/location export --directory=/var/lib/location/ipset --family=ipv4 --format=ipset; then
> 
> 		# Call initscript to reload the firewall.
> 		/etc/init.d/firewall reload
> -- 
> 2.30.2
>
  

Patch

diff --git a/src/scripts/update-location-database b/src/scripts/update-location-database
index 06b22d101..d41a0a947 100644
--- a/src/scripts/update-location-database
+++ b/src/scripts/update-location-database
@@ -42,8 +42,8 @@  fi
 
 # Get the latest location database from server.
 if /usr/bin/location update --cron=$UPDATE_INTERVAL; then
-	# Call location and export all countries in xt_geoip compatible format.
-	if /usr/bin/location export --directory=/usr/share/xt_geoip --family=ipv4 --format=xt_geoip; then
+	# Call location and export all countries in an ipset compatible format.
+	if /usr/bin/location export --directory=/var/lib/location/ipset --family=ipv4 --format=ipset; then
 
 		# Call initscript to reload the firewall.
 		/etc/init.d/firewall reload