OSDN Git Service

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