delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/07/09:23:09

Message-Id: <200507071323.j67DN67j012176@delorie.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: <fergus AT bonhard DOT uklinux DOT net>
From: "fergus" <fergus AT bonhard DOT uklinux DOT net>
To: <cygwin AT cygwin DOT com>
Cc: <fergus AT bonhard DOT uklinux DOT net>
Subject: Re: Latest uopdates to bash and ash, 20050707
Date: Thu, 7 Jul 2005 14:17:59 +0100
MIME-Version: 1.0
X-UoD-Scan-Signature: dec1ceffb7dd8ecb0d3d3c7934e8fb2f

Thanks for getting back so quickly.
Sorry about annoying typo in Subject.
(1) and (2) answer your qq. Please see also (3).

(1) I installed using setup, selecting everything (including source). I
always update using setup.

(2) There is no /bin/sh.exe.

cat /var/log/setup.log reveals postinstall scripts are called 00bash.sh and
00ash.sh but don't suppose that matters?

Here are _contents_ of 00*sh.done (hope that's what you were asking):

/etc/postinstall> cat 00ash.sh.done 
#!/bin/ash
# Ash postinstall script.  This ensures that /bin/sh exists and is
# runnable, favoring bash, and updating only if it is missing or ash
update=no
# Is /bin/sh missing, or have broken dependencies?
case `(cygcheck /bin/sh.exe) 2>&1` in
    *Error:\ could\ not\ find*) update=yes ;;
    *) # We can run it.  Is the version from ash?
        case `(/bin/sh.exe --version) 2>&1` in
            Illegal\ option\ --*) update=yes ;;
        esac ;;
esac
# Update, if needed.
if test $update = yes ; then
   cp -f /bin/bash.exe /bin/sh.exe || cp -f /bin/ash.exe /bin/sh.exe
fi 

... and ...

/etc/postinstall> cat 00bash.sh.done 
#!/bin/bash
# Bash postinstall script.  This ensures that /bin/sh exists and is
# runnable, updating older copies of ash or bash as appropriate, while
# leaving other shells (ksh or zsh) alone.
# Get rid of ash manpage, if it is in the way of our compressed page.
rm -f /usr/share/man/man1/sh.1
update=no
# Is /bin/sh missing, or have broken dependencies?
case `cygcheck /bin/sh.exe 2>&1` in
    *Error:\ could\ not\ find*) update=yes ;;
    *) # We can run it.  Is the version from ash or bash?
        case `/bin/sh.exe --version 2>&1` in
            Illegal\ option\ --* | GNU\ bash*) update=yes ;;
        esac ;;
esac
# Update, if needed.  Use copy, not hard or symlink, since symlinks won't
# work from Windows cmd and a hardlink to a running shell can't be broken.
# As a last-ditch fallback, try exec to stop running bash.
if test $update = yes ; then
    cp -f /bin/bash.exe /bin/sh.exe || exec cp -f /bin/bash.exe /bin/sh.exe
fi

(3) But when I actually run them, there's nothing echoed to screen. Nor is
any copy of nbash.exe created.

Thanks,

Fergus


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019