This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] getusershell, setusershell, endusershell


FWIW, I've added these three functions to Cygwin.  But there's something
which might need another tweak.  Getusershell returns shells from an
internal list of default shells if /etc/shells isn't available.

According to the Linux man pages, these are /bin/sh and /bin/csh.
I've implemented this list accordingly, just adding /usr/bin paths:

    /bin/sh			/usr/bin/sh
    /bin/csh			/usr/bin/csh

However, I had another look into the Solaris man pages.  According to
these man pages, the list on Solaris 9 looks a bit more complete:

    /bin/bash			/usr/bin/bash
    /bin/csh			/usr/bin/csh
    /bin/jsh			/usr/bin/jsh
    /bin/ksh			/usr/bin/ksh
    /bin/pfcsh			/usr/bin/pfcsh
    /bin/pfksh			/usr/bin/pfksh
    /bin/pfsh			/usr/bin/pfsh
    /bin/sh			/usr/bin/sh
    /bin/tcsh			/usr/bin/tcsh
    /bin/zsh			/usr/bin/zsh
    /sbin/jsh			/sbin/sh
    /usr/xpg4/bin/sh

Wow.  So the default shell list contains any shell which might be
shipped with Solaris and perhaps some more.

Should we do the same in Cygwin, adding all shells to the internal
default shell list, which are part of the Cygwin distro?  This would
bloat the list to something like

    /bin/sh			/usr/bin/sh
    /bin/bash			/usr/bin/bash
    /bin/csh			/usr/bin/csh
    /bin/tcsh			/usr/bin/tcsh
    /bin/ksh			/usr/bin/ksh
    /bin/pdksh			/usr/bin/pdksh
    /bin/zsh			/usr/bin/zsh

Or should we keep the short list as on Linux, knowing that our
postinstall scripts add and manipulate /etc/shells as needed?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]