[PATCH] base-files-4.0.6: Change prompt if running with admin rights

David Sastre d.sastre.medina@gmail.com
Tue Apr 26 02:52:00 GMT 2011


On Sun, Apr 24, 2011 at 06:39:12PM +0200, Christian Franke wrote:
> On 2011-04-01, Christian Franke wrote:
> >The attached patch for /etc/profile and /etc/bash.bashrc sets a
> >root prompt ('#' instead of '$' or '%') if the shell runs with
> >admin rights (local or domain admin group).

Trying to detect users with admin rights in order to provide some
enhancements is something I'd like to add to base-files, and has been
discussed before:

http://cygwin.com/ml/cygwin-apps/2011-02/msg00013.html

> If this patch is not accepted:
> Would it be possible to change /etc/profile such that PS1 is set
> before /etc/profile.d scripts are run?
> This would allow to change the prompt in a local /etc/profile.d
> script. This worked with the old base-files 3.9

This shouldn't be a problem. I'll look into it.
Another solution would be setting PS1 and/or PATH in the user's
.bashrc.

-- 
Huella de clave primaria: AD8F BDC0 5A2C FD5F A179  60E7 F79B AB04 5299 EC56
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: Digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110426/92b34f87/attachment.sig>


More information about the Cygwin mailing list