delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/07/15:12:56

X-Spam-Check-By: sourceware.org
Message-ID: <43974237.F0F2724F@dessent.net>
Date: Wed, 07 Dec 2005 12:12:39 -0800
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: bash vs sh in scripts
References: <20051207195602 DOT GA27946 AT panix DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT 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

David Arnstein wrote:

> Some cygwin packages install shell scripts that begin with the line
>         #!/bin/sh
> The latest example is the smartd script that smartmontools installs in
> /etc/rc.d/init.d. But there are many others. This seems to be standard
> Linux usage.
> 
> On some of my PCs, this causes the shell script to fail. In most
> cases, I can fix this by replacing the above line with
>         #!/usr/bin/bash

/bin/sh should exist and be a hard-link to /bin/bash.  If this is not
the case you have an installation problem.  The bash postinstall script
should ensure this.

/bin vs. /usr/bin is meaningless since they're the same under cygwin.

If you have no /bin/sh you will run into countless problems all over the
place, such as anything that calls system().

Brian

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