X-Spam-Check-By: sourceware.org Message-ID: <20680.147.14.10.170.1163507343.squirrel@webmail.hosting2.dk> Date: Tue, 14 Nov 2006 13:29:03 +0100 (CET) Subject: Re: [ANNOUNCEMENT] Updated: bash-3.2.3-5 From: "Jan Bruun Andersen" To: cygwin AT cygwin DOT com Reply-To: jan_bruun_andersen AT jabba DOT dk User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 I saw a couple of posts mentioning a problem with /bin/sh not being updated and replaced with a copy of /bin/bash. I had the same problem here yesterday/today, when I discovered that none of my #!/bin/sh scripts was working. In fact, they did nothing! I tried re-installing bash-3.2.3-5, I tried removing it (while ignoring all warnings about dependencies) and installing (keeping) it, but /bin/sh continued to be the same version from when I installed Cygwin back in February 2006: C:\cygwin\bin > dir bash.exe sh.exe Volymen i enhet C har ingen etikett. Volymens serienummer är 141C-8ED0 Innehåll i katalogen C:\cygwin\bin 2006-11-03 04:22 467 968 bash.exe Innehåll i katalogen C:\cygwin\bin 2006-02-08 19:03 451 072 sh.exe 2 fil(er) 919 040 byte 0 katalog(er) 22 278 008 832 byte ledigt I had a look at the /etc/postinstall/00bash.sh.done and 01bash.sh.done scripts and saw that they did some magic before calling /etc/profile.d/00bash.sh. I saw that the /etc/profile.d/00bash.sh tried to get the version from /bin/sh, and tried that by hand by my CMD.EXE: > \cygwin\bin\sh.exe --version C:\cygwin\etc\profile.d > \cygwin\bin\cygcheck.exe /bin/sh.exe C:/cygwin/bin/sh.exe C:/cygwin/bin\cygwin1.dll C:\WINDOWS\system32\ADVAPI32.DLL C:\WINDOWS\system32\ntdll.dll C:\WINDOWS\system32\KERNEL32.dll C:\WINDOWS\system32\RPCRT4.dll C:/cygwin/bin\cygintl-3.dll C:/cygwin/bin\cygiconv-2.dll C:/cygwin/bin\cygreadline6.dll C:/cygwin/bin\cygncurses-8.dll C:\WINDOWS\system32\USER32.dll C:\WINDOWS\system32\GDI32.dll Not being much wiser, I started a /bin/bash process, cd'ed to /etc/profile.d and attempted to execute /etc/profile.d/00bash.sh: $ cd /etc/profile.d/ [502] jba @ HERMETRIX /etc/profile.d $ ll *bash* -rwxr-x---+ 1 jba 839 Nov 3 04:22 00bash.csh -rwxr-x---+ 1 jba 1942 Nov 3 04:22 00bash.sh [503] jba @ HERMETRIX /etc/profile.d $ /bin/bash -x ./00bash.sh + /bin/test /bin/sh.exe -ot /bin/bash.exe ++ cat /proc/2516/exename + /bin/test /bin/sh.exe -ef /usr/bin/bash.exe + test -f /bin/sh.exe + case `(cygcheck /bin/sh.exe) 2>&1` in + case `(/bin/sh.exe --version) 2>&1` in + return 0 ./00bash.sh: line 29: return: can only `return' from a function or sourced scrip t ++ date '+%Y/%m/%d %T' + echo '2006/11/14 13:07:42 /etc/profile.d/00bash.sh:' 'Attempting to update /bi n/sh.exe' + /bin/cp -fpuv /bin/bash.exe /bin/sh.exe [504] jba @ HERMETRIX /etc/profile.d The copy succeded and I got my updated /bin/sh.exe: $ cd /bin [505] jba @ HERMETRIX /bin $ ll bash.exe sh.exe -rwxr-x---+ 1 jba 467968 Nov 3 04:22 bash.exe -rwxr-x---+ 1 jba 467968 Nov 3 04:22 sh.exe I don't know if this helps anyone understanding why the bash postinstall scripts did not succeed in updating /bin/sh. -- Jan Bruun Andersen -- 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/