https://bugzilla.novell.com/show_bug.cgi?id=340952 Summary: Check to see which shell is reading /etc/profile is wrong Product: openSUSE 10.3 Version: Final Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: torsten.foertsch@gmx.net QAContact: qa@suse.de Found By: --- If a script like /usr/sbin/Check (used during rpm building) with a shebang line that reads #!/bin/sh reads /etc/profile the check at the top of /etc/profile should set is=sh but instead it sets is=bash. That leads to a subsequent read of ~/.bashrc which is wrong if bash is in sh-mode. ~/.bashrc is by definition only read by a bash. It may contain statements that are understood by bash but not by sh. After patching my /etc/profile looks like this: if test -f /proc/mounts ; then case "`/bin/ls -l /proc/$$/exe`" in */bash) is=bash ;; */ash) is=ash ;; */ksh) is=ksh ;; */pdksh) is=ksh ;; */zsh) is=zsh ;; */*) is=sh ;; esac read x </proc/$$/cmdline case "$x" in sh|*/sh) is=sh ;; esac # # `r' in $- occurs *after* system files are parsed # for a in $SHELL ; do .. The "read x..." plus the case-statement are new. I have checked this with all mentioned shells, bash, ash, ksh, pdksh and zsh. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.