FreeBSD Bugzilla – Attachment 143349 Details for
Bug 189618
net/GeoIP: geoipupdate.sh don't update file atomically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch to fix problem
geoipupdate.sh.in.patch.txt (text/plain), 1.12 KB, created by
Yasuhito FUTATSUKI
on 2014-06-04 04:06:47 UTC
(
hide
)
Description:
Updated patch to fix problem
Filename:
MIME Type:
Creator:
Yasuhito FUTATSUKI
Created:
2014-06-04 04:06:47 UTC
Size:
1.12 KB
patch
obsolete
>Index: geoipupdate.sh.in >=================================================================== >--- geoipupdate.sh.in (revision 353207) >+++ geoipupdate.sh.in (working copy) >@@ -1,2 +1,27 @@ > #!/bin/sh >-fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | gunzip > %%DATADIR%%/GeoIP.dat >+TEMPFILE=`mktemp %%DATADIR%%/GeoIP.dat-XXXXXX` >+if fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | gunzip >> $TEMPFILE ; then >+ chmod og+r $TEMPFILE >+ if ! mv $TEMPFILE %%DATADIR%%/GeoIP.dat ; then >+ rm $TEMPFILE >+ echo fail to substitute GeoIP.dat >+ exit 2 >+ fi >+else >+ rm $TEMPFILE >+ echo fail to update GeoIP.dat >+ exit 1 >+fi >+TEMPFILE=`mktemp %%DATADIR%%/GeoIPv6.dat-XXXXXX` >+if fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz | gunzip >> $TEMPFILE ; then >+ chmod og+r $TEMPFILE >+ if ! mv $TEMPFILE %%DATADIR%%/GeoIPv6.dat ; then >+ rm $TEMPFILE >+ echo fail to substitute GeoIPv6.dat >+ exit 2 >+ fi >+else >+ rm $TEMPFILE >+ echo fail to update GeoIPv6.dat >+ exit 1 >+fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 189618
:
142579
| 143349