This is the mail archive of the
mailing list for the Cygwin project.
Re: How to install a custom permanent postinstall handler?
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin at cygwin dot com
- Date: Sun, 03 Apr 2016 14:02:40 +0200
- Subject: Re: How to install a custom permanent postinstall handler?
- Authentication-results: sourceware.org; auth=none
- References: <838469265 dot 20160401235308 at yandex dot ru> <87a8lcicxg dot fsf at Rainer dot invalid> <5700975A dot 3070002 at cygwin dot com> <87y48vqkfx dot fsf at Rainer dot invalid> <570102D3 dot 6000502 at arcor dot de>
Dirk Fassbender writes:
> So it is not easy to write portable scripts for the standard shell
> /bin/sh between different systems and the exchange of the standard
> shell needs a check for all scripts, that uses a shebang line /bin/sh
> or are use during system initialisation.
Whatever is under /bin/sh is supposed to be POSIX compliant. If you
make use of your knowledge of what shell this actually is (dash, posh,
bash, busybox, etc.), then you're by definition not interested in having
a portable script and could just as easily use a different shebang line.
> I personally prefer to use a shebang line set to the shell type used
> (ksh, bash, dash). This is more portable for different system types.
You're specifying a shell type and only have to deal with portability
among the versions of that shell. But you're explicitly saying your
script (possibly) isn't POSIX compatible.
> For putting the /bin/sh under alternatives control on cygwin there
> must be some preparations.
> There are several postinstall and preremove scripts without a shebang
> line or with a shebang line /bin/sh or /usr/bin/sh. Are all of these
> scripts written to run correctly with a bash and dash invoked ?
The shebang line isn't even looked at for the postinstall scripts. The
suffix is what determines which shell gets to run the scripts.
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple