diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:35:11 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:35:11 +0900 |
commit | 0d172eb43ecb47affe5cb62dfd5ecfd5a66aaec0 (patch) | |
tree | e8fc3a7f51af17fe8a4d3b9efb07f5de696a736f /profile | |
parent | c8062cc8c2c66e2462154ce3a8d973b15f2d2366 (diff) | |
download | setup-tizen_2.3.1.tar.gz setup-tizen_2.3.1.tar.bz2 setup-tizen_2.3.1.zip |
tizen 2.3.1 releasetizen_2.3.1_releasesubmit/tizen_2.3.1/20150915.100927tizen_2.3.1
Diffstat (limited to 'profile')
-rw-r--r-- | profile | 58 |
1 files changed, 4 insertions, 54 deletions
@@ -1,65 +1,15 @@ # /etc/profile -# System wide environment and startup programs, for login setup +# System wide environment and startup programs # Functions and aliases go in /etc/bashrc -# It's NOT good idea to change this file unless you know what you -# are doing. Much better way is to create custom.sh shell script in -# /etc/profile.d/ to make custom changes to environment. This will -# prevent need for merging in future updates. - -pathmunge () { - if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then - if [ "$2" = "after" ] ; then - PATH=$PATH:$1 - else - PATH=$1:$PATH - fi - fi -} - - -if [ -x /usr/bin/id ]; then - if [ -z "$EUID" ]; then - # ksh workaround - EUID=`id -u` - UID=`id -ru` - fi - USER="`id -un`" - LOGNAME=$USER - MAIL="/var/spool/mail/$USER" -fi - -# Path manipulation -if [ "$EUID" = "0" ]; then - pathmunge /sbin - pathmunge /usr/sbin - pathmunge /usr/local/sbin -else - pathmunge /usr/local/sbin after - pathmunge /usr/sbin after - pathmunge /sbin after -fi - -HOSTNAME=`/bin/hostname 2>/dev/null` +HOSTNAME=`/bin/hostname` HISTSIZE=1000 -if [ "$HISTCONTROL" = "ignorespace" ] ; then - export HISTCONTROL=ignoreboth -else - export HISTCONTROL=ignoredups -fi -export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL +export PATH HOSTNAME HISTSIZE for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then - if [ "$PS1" ]; then - . $i - else - . $i >/dev/null 2>&1 - fi + . $i fi done - -unset i -unset pathmunge |