mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
2.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/sysfiles/etc_profile.txt
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. # determine the effective user id
  23. # note that bash defines EUID as a read-only variable for this purpose
  24. _EUID="$( id -u )"
  25. # set the PATH-variable
  26. export PATH=""
  27. for _bindir in $HOME${HOME:+/bin} /usr/local/bin /usr/bin /bin /usr/X11/bin \
  28. /usr/games /usr/local/games /opt/*/bin /opt/*/games
  29. do
  30. if [ -d "$_bindir" ]; then
  31. PATH="$PATH${PATH:+:}$_bindir"
  32. fi
  33. if [ -w / -o "$_EUID" == 0 ]; then
  34. _sbindir=${_bindir/%\/bin/\/sbin}
  35. if [ "$_bindir" != "$_sbindir" -a -d "$_sbindir" ]; then
  36. PATH="$PATH${PATH:+:}$_sbindir"
  37. fi
  38. fi
  39. done
  40. unset _bindir _sbindir
  41. # set the prompts for bash and ksh
  42. #
  43. if [ "$PS1" ] ; then
  44. PS1='$ ' ; PS2='> ' ; PS4='+ '
  45. [ "$BASH_VERSION" ] && PS1='\u@\h:\w\$ '
  46. [ "$KSH_VERSION" -a -w / ] && PS1='$USER:$PWD# '
  47. [ "$KSH_VERSION" -a ! -w / ] && PS1='$USER:$PWD$ '
  48. fi
  49. # set some enviroment-variables
  50. #
  51. export EDITOR="vi"
  52. export PAGER="less -R"
  53. export BLOCKSIZE=K
  54. export INPUTRC="/etc/inputrc"
  55. # set the MANPATH variable
  56. #
  57. export MANPATH=/usr/share/man
  58. for x in /usr/X11/man /usr/local/man /usr/local/share/man /opt/*/man
  59. do [ -d $x ] && MANPATH="$MANPATH:$x" ; done
  60. # set the INFOPATH variable
  61. #
  62. export INFOPATH=/usr/share/info
  63. for x in /usr/X11/info /usr/local/info /usr/local/share/info /opt/*/info
  64. do [ -d $x ] && INFOPATH="$INFOPATH:$x" ; done
  65. # set the PKG_CONFIG_PATH variable
  66. #
  67. export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
  68. for x in /usr/X11/lib /usr/local/lib /opt/*/lib $HOME/lib
  69. do [ -d $x/pkgconfig ] && PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$x/pkgconfig" ; done
  70. # some useful aliases (only if this is an interactive shell)
  71. #
  72. if [ "$PS1" ] ; then
  73. alias -- +='pushd .'
  74. alias -- -='popd'
  75. alias ..='cd ..'
  76. alias ...='cd ../..'
  77. eval `dircolors -b /etc/dircolors`
  78. [ -w / ] && alias ls="ls --color=auto -a" ||
  79. alias ls="ls --color=auto"
  80. alias l="ll -a" ; alias ll="ls -l"
  81. alias which="type -p"
  82. alias rehash="hash -r"
  83. fi
  84. # include local profiles
  85. #
  86. for x in /etc/profile.d/* /etc/conf/profile ; do
  87. [[ $x == *.csh ]] && continue
  88. [ -f $x ] && . $x
  89. done
  90. unset _EUID x