export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:.

# Set some vars
if [ "$USER" = "" ]
then
  export USER="root"
fi
   
if [ "$HOME" = "" ]
then
  export HOME=`grep "^$USER" /etc/passwd | cut -d ":" -f 6`
fi

if [ ! -d "$HOME" ]
then
  export HOME="/"
fi

if [ "$FIRST" != "done" ]
then
  if [ ! -f /bin/-sh ]
  then
    ln -s -- /bin/ae /bin/-sh
  fi
	
  export FIRST="done"
  
  # Start ae as login-shell
  exec -sh
else
  unset FIRST

  export sPS1="`hostname`:"

  # Define a new cd command (I want to know where I am)
  cd() {
  builtin cd $@ && export PS1="$sPS1`builtin pwd` # "
  }

  # Define the L command
  alias l ls -la

  cd

  echo
  /usr/local/bin/colecho "Welcome to fli4l !" br x br
  echo
fi
