Posted By

trusktr on 11/08/10


Tagged


Versions (?)

Arch /etc/profile


 / Published in: Bash
 

  1. #
  2. # /etc/profile
  3. #
  4. # This file is intended to be used for ALL common
  5. # Bourne-compatible shells. Shell specifics should be
  6. # handled in /etc/profile.$SHELL where $SHELL is the name
  7. # of the binary being run (discounting symlinks)
  8. #
  9. # Sections taken from SuSe's /etc/profile
  10. # Note the explicit use of 'test' to cover all bases
  11. # and potentially incompatible shells
  12.  
  13. #Determine our shell without using $SHELL, which may lie
  14. shell="sh"
  15. if test -f /proc/mounts; then
  16. case $(/bin/ls -l /proc/$$/exe) in
  17. *bash) shell=bash ;;
  18. *dash) shell=dash ;;
  19. *ash) shell=ash ;;
  20. *ksh) shell=ksh ;;
  21. *zsh) shell=zsh ;;
  22. esac
  23. fi
  24.  
  25. # Load shell specific profile settings
  26. test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
  27.  
  28. #Set our umask
  29. umask 022
  30.  
  31. # Set our default path
  32. PATH="/bin:/usr/bin:/sbin:/usr/sbin"
  33. export PATH
  34.  
  35. # Export default pkg-config path
  36. PKG_CONFIG_PATH="/usr/lib/pkgconfig"
  37. export PKG_CONFIG_PATH
  38.  
  39. # Some readline stuff that is fairly common
  40. HISTSIZE=1000
  41. HISTCONTROL="erasedups"
  42.  
  43. INPUTRC="/etc/inputrc"
  44. LESS="-R"
  45.  
  46. export HISTSIZE HISTCONTROL INPUTRC LESS
  47.  
  48. # Load profiles from /etc/profile.d
  49. if test -d /etc/profile.d/; then
  50. for profile in /etc/profile.d/*.sh; do
  51. test -x $profile && . $profile
  52. done
  53. unset profile
  54. fi
  55.  
  56. # Termcap is outdated, old, and crusty, kill it.
  57. unset TERMCAP
  58.  
  59. # Man is much better than us at figuring this out
  60. unset MANPATH

Report this snippet  

You need to login to post a comment.