On Mon, Mar 11, 2002 at 05:15:52PM -0800, Ben Reser wrote:
> Fudge bash doesn't set $loginsh
> I'll come up with an alternative fix in a sec...
Okay this fixes it. I used $loginsh since it seems to be the standard
name I can find out on the net for something like this.
I unset it at the end of /etc/bashrc.
I swear this really works this time. :)
--
Ben Reser <[EMAIL PROTECTED]>
http://ben.reser.org
What difference does it make to the dead, the orphans, and the homeless,
whether the mad destruction is wrought under the name of totalitarianism
or the holy name of liberty and democracy? - Ghandi
*** bashrc~ Mon Mar 11 17:01:17 2002
--- bashrc Mon Mar 11 17:24:28 2002
***************
*** 22,28 ****
esac
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
! if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -x $i ]; then
. $i
--- 22,28 ----
esac
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
! if [ -z "$loginsh" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -x $i ]; then
. $i
***************
*** 30,32 ****
--- 30,34 ----
done
fi
fi
+
+ unset loginsh
*** profile~ Mon Mar 11 17:23:25 2002
--- profile Mon Mar 11 17:23:42 2002
***************
*** 1,6 ****
--- 1,10 ----
# /etc/profile -*- Mode: shell-script -*-
# (c) MandrakeSoft, Chmouel Boudjnah <[EMAIL PROTECTED]>
+ # Since we're invocated as a login shell set loginsh
+ # so that we can avoid sourcing some files twice.
+ loginsh=1
+
# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1