From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30778 invoked by alias); 1 Dec 2016 18:24:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 30741 invoked by uid 89); 1 Dec 2016 18:24:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail307.opentransfer.com Received: from mail307.opentransfer.com (HELO mail307.opentransfer.com) (98.130.1.152) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Dec 2016 18:24:16 +0000 Received: (qmail 3726 invoked by uid 399); 1 Dec 2016 18:24:07 -0000 Received: from unknown (HELO ?10.0.0.87?) (enrique@perezterron.net@88.88.45.126) by mail307.opentransfer.com with ESMTPAM; 1 Dec 2016 18:24:07 -0000 To: cygwin@cygwin.com From: Enrqiue Perez-Terron Subject: [patch] /etc/postinstall/GeoIP-database.sh terminates with exit code 1 Message-ID: <3f09aa14-e86d-b6c2-be4f-77011e7ac6ff@perezterron.net> Date: Thu, 01 Dec 2016 18:24:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-12/txt/msg00019.txt.bz2 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