pghmcfc pushed to GeoIP (el5). "Move link to GeoLiteCountry.dat on update only if it previously pointed to GeoIP-initial.dat"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 07:39:47 UTC 2015


>From fbde5c893b684abaafa018659e6d397ec5d938b2 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Thu, 13 Jun 2013 18:32:39 -0600
Subject: Move link to GeoLiteCountry.dat on update only if it previously
 pointed to GeoIP-initial.dat


diff --git a/GeoIP.spec b/GeoIP.spec
index 3244506..c55976f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -155,11 +155,13 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
+* Thu Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
 - Bump to version 1.5.1
 - Fix exit codes for various situations (MaxMind support #129155)
 - Use versioned obsoletes/provides for geoip-geolite
 - Update UTF8 patch
+- Change symlink from GeoIP-initial.dat to GeoLiteCountry.dat if we had a
+  successful download and now have the latter file.
 
 * Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
 - Annotate conflict with geoip-geolite package (#968074)
diff --git a/geoipupdate.cron b/geoipupdate.cron
index 892b974..bacf508 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,4 +1,7 @@
 #!/bin/sh
 
-geoipupdate > /dev/null && \
-	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
+if geoipupdate > /dev/null; then
+	if [ $(readlink -n /usr/share/GeoIP/GeoIP.dat) == "GeoIP-initial.dat" -a -f "/usr/share/GeoIP/GeoLiteCountry.dat" ]; then
+	  	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
+	fi
+fi
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=el5&id=fbde5c893b684abaafa018659e6d397ec5d938b2


More information about the scm-commits mailing list