profile 1020 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # /etc/profile
  2. # Set our umask
  3. umask 022
  4. # Append "$1" to $PATH when not already in.
  5. # This function API is accessible to scripts in /etc/profile.d
  6. append_path () {
  7. case ":$PATH:" in
  8. *:"$1":*)
  9. ;;
  10. *)
  11. PATH="${PATH:+$PATH:}$1"
  12. esac
  13. }
  14. # Append our default paths
  15. append_path '/usr/local/sbin'
  16. append_path '/usr/local/bin'
  17. append_path '/usr/bin'
  18. # Force PATH to be environment
  19. export PATH
  20. # Load profiles from /etc/profile.d
  21. if test -d /etc/profile.d/; then
  22. for profile in /etc/profile.d/*.sh; do
  23. test -r "$profile" && . "$profile"
  24. done
  25. unset profile
  26. fi
  27. # Unload our profile API functions
  28. unset -f append_path
  29. # Source global bash config, when interactive but not posix or sh mode
  30. if test "$BASH" &&\
  31. test "$PS1" &&\
  32. test -z "$POSIXLY_CORRECT" &&\
  33. test "${0#-}" != sh &&\
  34. test -r /etc/bash.bashrc
  35. then
  36. . /etc/bash.bashrc
  37. fi
  38. # Termcap is outdated, old, and crusty, kill it.
  39. unset TERMCAP
  40. # Man is much better than us at figuring this out
  41. unset MANPATH