X-Spam-Check-By: sourceware.org Date: Thu, 08 Dec 2005 16:21:51 -0500 From: "Pierre A. Humblet" Subject: Re: exim 4.54-1 and broken symlinks To: "Krzysztof Duleba" , Message-id: <026d01c5fc3d$68641040$fb0010ac@wirelessworld.airvananet.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=iso-8859-2; reply-type=response Content-transfer-encoding: 7bit References: <020a01c5fc0b$9a51d060$fb0010ac AT wirelessworld DOT airvananet DOT com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com ----- Original Message ----- From: "Krzysztof Duleba" To: Sent: Thursday, December 08, 2005 2:02 PM Subject: Re: exim 4.54-1 and broken symlinks > Krzysztof Duleba wrote: > >>> Hum, I just installed the latest exim on a new machine and can't >>> reproduce >>> what you describe. exim-config created >>> lrwxrwxrwx 1 p-humblet sw 13 Dec 8 10:10 /usr/sbin/sendmail -> >>> /usr/bin/exim* >>> (no .exe anywhere) , as one would expect from the line >>> ln -s -f /usr/bin/exim /usr/sbin/sendmail && >>> >>> Could there be a problem with your ln? >> >> Yes, you're right, the problem is with ln, *.exe magic and exim using >> symlink to a symlink. I also think that updating exim (setup.log shows >> that I had exim-4.52-2 installed) could do some damage, I'm not sure how, >> though. Anyway, it's nothing wrong with Cygwin exim package, as it >> appears. > > OK, now I know the reason. I forgot to reboot my computer after the update > and then I ran exim-config. Things were messed up. Finally I rebooted, but > it didn't help much and exim -bV still showed wrong version number (why?). > Reinstalling exim fixed that, but didn't fix the broken symlink (I > restored it to previous broken state earlier on). > > I think there should be some check in the setup that warns *before* > upgrading services that are running. Are there plans for such a feature? > > Krzysztof Duleba I still don't understand how the .exe got to appear... What I observe here is that if a.exe exists, then ln -s a b produces b.exe ==> a.exe (weird to me) However ln -s a.exe b produces b ==>a.exe So that explains how sendmail.exe appears when exim.exe exists, but doesn't explain how /bin/exim.exe appeared in the first place. Perhaps a previous version of ln behaved differently. In that case you might have /bin/exim.exe ==> /bin/exim-old.exe /bin/exim ==> /bin/exim-new.exe To resolve the filename "exim", path.cc in Cygwin searches for exim, exim.exe, exim.exe.lnk and exim.lnk, stopping when it finds an existing file. Thus both "exim" and "exim.exe" resolve to /bin/exim-old.exe That would explain what you observed. You may amuse yourself by typing ln -s /bin/yes y (produces y.exe.lnk) ln -s /bin/ls.exe y (produces y.lnk) and then ./y Anybody else has a symlink /usr/bin/exim.exe and/or /usr/sbin/sendmail.exe ? If so I will fix things in the postinstall of the next exim release, coming out soon. Regarding your remark about setup, it should be OK to install a new exim-Y.exe, while the previous exim-X.exe is still running. Setup will set the /bin/exim symlink to point to exim-Y.exe. exim-X will keep running until it re-execs following a kill -HUP, or until a reboot (assuming that cygrunsrv is using the /bin/exim symlink). Then you get exim-Y.exe. Doing it that way you can get your server to operate non-stop through an update. However I am not sure if the old exim-X.exe is going to be deleted. Also, each time you run exim-config, it checks if /bin/exim is executable. If not, it sets the symlink to the most recent version in /bin/exim*.exe. So, I don't see how forgetting to reboot after an upgrade and then running exim-config could mess up things. exim-config should see that exim is running and ask if you want to stop it. If you answer no, exim-X.exe keeps running. Otherwise it stops and next time you get exim-Y.exe In no case is the symlink affected. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/