Bug 8592 - /etc/profile & /etc/bashrc violate PS1 conventions and prevent ~/.inputrc from working at all
Summary: /etc/profile & /etc/bashrc violate PS1 conventions and prevent ~/.inputrc fro...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 5.2
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-19 05:21 UTC by Stig Hackvan
Modified: 2014-03-17 02:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-16 17:48:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Stig Hackvan 2000-01-19 05:21:27 UTC
PS1 is _supposed to be unset_ when the shell is non-interactive.  Since 5.2
and perhaps before that, the redhat default environment has gone to great
lengths to break this behavior.  (so much for peer review.)

here's my repair script which does roughly what needs to be done...
{modify the export line to not export PS1 or INPUTRC to be 100% correct}

report() { echo "$@" 1>&2 ; }

if egrep -qs ^INPUTRC= /etc/profile; then
  report "fixing /etc/profile and creating /etc/skel/.inputrc"
  perl -pi~ -e 's,^(INPUTRC=),# $1,' /etc/profile
  echo '$include /etc/inputrc' >/etc/skel/.inputrc
fi

if egrep -qs ^PS1= /etc/profile; then
  report "don't unconditionally set PS1 in /etc/profile !!!!"
  perl -pi~ -e 's,^(PS1=),test "\$PS1" && $1,' /etc/profile /etc/bashrc
fi

Comment 1 Bill Nottingham 2000-02-16 17:48:59 UTC
fixed in setup-2.1.6.


Note You need to log in before you can comment on or make changes to this bug.