On 26/08/07 12:03:34, [EMAIL PROTECTED] wrote:
> Hello!
> 
> 
> I  have  a very strange problem all with a sudden. Today I accidentally logged
> out after removing a directory in my home that only  contained  just  unpacked
> files  of  a  zip-file.  I  logged  out  with  C-d.  But I might have hit some
> additional keys around d (it wasn't intended at all).
> When logging in a moment later I got the messages:
> 
> Password:
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> -bash: NEWPATH: command not found
> [EMAIL PROTECTED]:~$
> 
> I think they come from the .bash_profile I have from LFS 5.1.1 (in the  append
> function is a "local NEWPATH"). The shell I have seems to be bash (output from
> ps -ef) and just seems to have an incomplete PATH. Propably because the append
> function in bash_profile did not work.
> I  can  log  in  as  root  or  another  normal  user  without  a  problem. The
> .bash_profile does not differ except  for  additional  usages  of  append  and
> export.

I  found  the  source of the problem: In that session I had created $HOME/bin.
That being the only source of the append command in my .bash_profile had  then
cause  the  further  problems.  I  now only wonder what's wrong with my append
command. I seem to have avoided it... This is what is in my .bash_profile:

# Begin ~/.bash_profile
# Written for Beyond Linux From Scratch
# by James Robertson <[EMAIL PROTECTED]>
# updated by Bruce Dubbs <[EMAIL PROTECTED]>

# Personal environment variables and startup programs.

# Personal aliases and functions should go in ~/.bashrc.  System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.

append () {
  # First remove the directory
  local IFS=':'
  local NEWPATH
  for DIR in $PATH; do
     if [ "$DIR" != "$1" ]; then
       NEWPATH = ${NEWPATH:+$NEWPATH:}$DIR
     fi
  done

  # Then append the directory
  export PATH=$NEWPATH:$1
}

if [ -f "$HOME/.bashrc" ] ; then
        source $HOME/.bashrc
fi

if [ -d "$HOME/bin" ] ; then
  append $HOME/bin
fi


export PATH=$HOME/scripts:$PATH
export PATH=$PATH:/usr/local/avr/bin
#export LANG=de_DE #done in /etc/profile.d/setterm.sh !!!
export LC_MESSAGES=en_GB
export MAIL=$HOME/Mail
#export MANPAGER="/bin/less -isRj10"

unset append

# End ~/.bash_profile


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to