ash not a POSIX.2 compliant shell. - Minix

This is a discussion on ash not a POSIX.2 compliant shell. - Minix ; As far as I can tell many problems I have with shell scripts (eg. ../configure) and makefiles relate to the use of ash(1) instead of a proper Bourne or Korn shell as the default shell. But simply replacing the /bin/sh ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ash not a POSIX.2 compliant shell.

  1. ash not a POSIX.2 compliant shell.

    As far as I can tell many problems I have with shell scripts (eg.
    ../configure) and makefiles relate to the use of ash(1) instead of a
    proper Bourne or Korn shell as the default shell. But simply replacing
    the /bin/sh with ksh hangs the Minix system on startup / reboot.

    ash(1) does not appear to Bourne compatible.

    For example this makefile extract:

    build :
    @for i in $(BUILD_DIRS); do \
    if ! ( cd $$i && $(MAKE) $@ ); then exit 1; fi \
    done

    does not work on Minix. The above generates an error of the form:

    Syntax error: word unexpected (expecting ")")

    BTW this error is also seen when trying to startx or xinit. Since X
    windows uses many shell scipts, they will most likely assume a Bourne shell.

    The work around for the above is to not use the logical NOT operator:

    build : title
    @for i in $(BUILD_DIRS); do \
    if ( cd $@$i && $(MAKE) $@ ); then : else exit 1; fi \
    done

    I suggest that Minix consider using a truly POSIX.2 shell ie. Bourne
    compatible as the default shell to simplify and encourage *nix users to
    try Minix and to make it easier to port software to this platform.

    --
    Anthony C Howe Skype: SirWumpus SnertSoft
    +33 6 11 89 73 78 AIM: SirWumpus Sendmail Milter Solutions
    http://www.snert.com/ ICQ: 7116561 http://www.snertsoft.com/

  2. Re: ash not a POSIX.2 compliant shell.

    In article ,
    Anthony Howe wrote:
    > if ! ( cd $$i && $(MAKE) $@ ); then exit 1; fi \
    >
    >I suggest that Minix consider using a truly POSIX.2 shell ie. Bourne
    >compatible as the default shell to simplify and encourage *nix users to
    >try Minix and to make it easier to port software to this platform.


    In general, please site chapter and verse when claiming that a feature
    is or is not POSIX. Popular features are not always part of POSIX.

    I recently updated ash to a newer version. But a bit more testing is
    required.




    --
    That was it. Done. The faulty Monk was turned out into the desert where it
    could believe what it liked, including the idea that it had been hard done
    by. It was allowed to keep its horse, since horses were so cheap to make.
    -- Douglas Adams in Dirk Gently's Holistic Detective Agency

  3. Re: ash not a POSIX.2 compliant shell.

    Philip Homburg wrote:
    > In article ,
    > Anthony Howe wrote:
    >> if ! ( cd $$i && $(MAKE) $@ ); then exit 1; fi \
    >>
    >> I suggest that Minix consider using a truly POSIX.2 shell ie. Bourne
    >> compatible as the default shell to simplify and encourage *nix users to
    >> try Minix and to make it easier to port software to this platform.

    >
    > In general, please site chapter and verse when claiming that a feature
    > is or is not POSIX. Popular features are not always part of POSIX.


    X/Open's Single Unix Specification incorporates POSIX.1 and POSIX.2 and
    documents many of the historical APIs outside of POSIX.1 from System V
    or BSD.

    The chapter and verse can be found on-line here:

    http://www.opengroup.org/onlinepubs/...l#tag_02_09_02
    2.9.2 Pipelines

    The rationale can be found here.

    http://www.opengroup.org/onlinepubs/...html#tag_02_02
    "
    C.2.1 Shell Introduction

    The System V shell was selected as the starting point for the Shell and
    Utilities volume of IEEE Std 1003.1-2001. The BSD C shell was excluded
    from consideration for the following reasons:

    Most historically portable shell scripts assume the Version 7 Bourne
    shell, from which the System V shell is derived.
    "

    And the rationale on Pipelines and the ! operator:

    http://www.opengroup.org/onlinepubs/...ag_02_02_09_04


    Specifically:

    "
    The reserved word ! allows more flexible testing using AND and OR lists.
    "

    If you want I could pull out my old copy of POSIX.2 Shell & Utilities
    P1003.2 Draft 12 July 1992 and cite you page and line number. While a
    little dated, it should still be very close to what you see on X/Open.

    --
    Anthony C Howe Skype: SirWumpus SnertSoft
    +33 6 11 89 73 78 AIM: SirWumpus Sendmail Milter Solutions
    http://www.snert.com/ ICQ: 7116561 http://www.snertsoft.com/

+ Reply to Thread