targets/amd64/H340: new target for Acer Aspire EasyStore H340 NAS brick
[CDN/Mosi.git] / targets / amd64 / H340 / config / patch / etc_profile-sensible-defaults.patch
1 --- etc/profile 2010-01-24 09:37:51.000000000 +0000
2 +++ etc/profile 2010-01-24 09:54:47.000000000 +0000
3 @@ -16,3 +16,59 @@
4  # msgs -f
5  # Allow terminal messages
6  # mesg y
7 +
8 +# Title for titleable terminals
9 +case "${TERM}" in
10 +xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
11 +        title="\[\033]0;\h(\u)\007\]"
12 +        ;;
13 +screen)
14 +        title="\[\033_\h(\u)\033\\\]"
15 +        ;;
16 +*)
17 +        title=""
18 +        ;;
19 +esac
20 +
21 +# Set the flag variable, if we can
22 +[ -x "$(which flag)" -a ! -f "${HOME}/.noflag" ] && export FLAG="($($(which flag) -e))"
23 +export PS1="${title}${FLAG}${PS1}"
24 +
25 +# Set up input handling and environment
26 +[ -f /etc/inputrc ] && export INPUTRC=/etc/inputrc
27 +[ -f "${HOME}/.inputrc" ] && export INPUTRC="${HOME}/.inputrc"
28 +
29 +[ -f "${HOME}/.shrc" ] && . "${HOME}/.shrc"
30 +
31 +export BLOCKSIZE=K
32 +export EDITOR=vi
33 +export PAGER=less
34 +
35 +# Path
36 +if [ "$(id -u)" -eq 0 ] || (id -nG | egrep -q "(^wheel *|* wheel *|* wheel$)")
37 +then
38 +    export PATH=${HOME}/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin
39 +else
40 +    export PATH=${HOME}/bin:/bin:/usr/bin:/usr/games:/usr/local/bin
41 +fi
42 +
43 +# Local environment
44 +if [ -n "${BASH}" ]
45 +then
46 +    if [ -f "${HOME}/.bashrc" ]
47 +    then
48 +        export ENV="${HOME}/.bashrc"
49 +        . "${HOME}/.bashrc"
50 +    elif [ -f "/etc/bashrc" ]
51 +    then
52 +        export ENV="/etc/bashrc"
53 +        . "/etc/bashrc"
54 +    fi
55 +else
56 +    if [ -f "${HOME}/.shrc" ]
57 +    then
58 +        export ENV="${HOME}/.shrc"
59 +        . "${HOME}/.shrc"
60 +    fi
61 +fi
62 +