* [patch] /etc/postinstall/GeoIP-database.sh terminates with exit code 1
@ 2016-12-01 18:24 Enrqiue Perez-Terron
0 siblings, 0 replies; only message in thread
From: Enrqiue Perez-Terron @ 2016-12-01 18:24 UTC (permalink / raw)
To: cygwin
Hello,
The file /etc/postinstall/GeoIP-database.sh has an error;
it needs an absolute path in the first existence test (line 4 below).
The correct contents of the file becomes:
$ cat -n /tmp/GeoIP-database.sh
1 for f in /usr/share/GeoIP/*.dat; do
2 case ${f##*/} in
3 GeoLiteCountry.dat)
4 [ -e /usr/share/GeoIP/GeoIP.dat ] || /bin/ln -s ${f##*/} /usr/share/GeoIP/GeoIP.dat
5 ;;
6 GeoLite*.dat)
7 [ -e ${f/Lite/IP} ] || /bin/ln -s ${f##*/} ${f/Lite/IP}
8 ;;
9 esac
10 done
The uncorrected mistake makes the script terminate with this message:
(From /var/log/setup.log.full)
2016/12/01 18:26:35 running: C:\cygwin\bin\bash.exe --norc --noprofile "/etc/postinstall/GeoIP-database.sh"
/bin/ln: failed to create symbolic link '/usr/share/GeoIP/GeoIP.dat': File exists
2016/12/01 18:26:35 abnormal exit: exit code=1
Patch:
$ diff -u /etc/postinstall/GeoIP-database.sh /tmp/GeoIP-database.sh
--- /etc/postinstall/GeoIP-database.sh 2016-11-08 21:47:53.000000000 +0100
+++ /tmp/GeoIP-database.sh 2016-12-01 18:50:18.768493100 +0100
@@ -1,7 +1,7 @@
for f in /usr/share/GeoIP/*.dat; do
case ${f##*/} in
GeoLiteCountry.dat)
- [ -e GeoIP.dat ] || /bin/ln -s ${f##*/} /usr/share/GeoIP/GeoIP.dat
+ [ -e /usr/share/GeoIP/GeoIP.dat ] || /bin/ln -s ${f##*/} /usr/share/GeoIP/GeoIP.dat
;;
GeoLite*.dat)
[ -e ${f/Lite/IP} ] || /bin/ln -s ${f##*/} ${f/Lite/IP}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-01 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01 18:24 [patch] /etc/postinstall/GeoIP-database.sh terminates with exit code 1 Enrqiue Perez-Terron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).