summaryrefslogtreecommitdiff
path: root/profile
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-09-09 02:35:11 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-09-09 02:35:11 +0900
commit0d172eb43ecb47affe5cb62dfd5ecfd5a66aaec0 (patch)
treee8fc3a7f51af17fe8a4d3b9efb07f5de696a736f /profile
parentc8062cc8c2c66e2462154ce3a8d973b15f2d2366 (diff)
downloadsetup-tizen_2.3.1.tar.gz
setup-tizen_2.3.1.tar.bz2
setup-tizen_2.3.1.zip
Diffstat (limited to 'profile')
-rw-r--r--profile58
1 files changed, 4 insertions, 54 deletions
diff --git a/profile b/profile
index eddf6bd..d81777b 100644
--- a/profile
+++ b/profile
@@ -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