FreeBSD Bugzilla – Attachment 142579 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]
file.diff
file.diff (text/plain), 753 bytes, created by
Yasuhito FUTATSUKI
on 2014-05-10 18:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Yasuhito FUTATSUKI
Created:
2014-05-10 18:10:00 UTC
Size:
753 bytes
patch
obsolete
>Index: files/geoipupdate.sh.in >=================================================================== >--- files/geoipupdate.sh.in (revision 353207) >+++ files/geoipupdate.sh.in (working copy) >@@ -1,2 +1,14 @@ > #!/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
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