diff options
Diffstat (limited to 'main/alpine-baselayout/profile')
-rw-r--r-- | main/alpine-baselayout/profile | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/main/alpine-baselayout/profile b/main/alpine-baselayout/profile index 1b5b2777b4e..fbc3ba0cd50 100644 --- a/main/alpine-baselayout/profile +++ b/main/alpine-baselayout/profile @@ -1,12 +1,24 @@ -export CHARSET=UTF-8 -export LANG=C.UTF-8 -export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + export PAGER=less -export PS1='\h:\w\$ ' umask 022 +# use nicer PS1 for bash and busybox ash +if [ -n "$BASH_VERSION" -o "$BB_ASH_VERSION" ]; then + PS1='\h:\w\$ ' +# use nicer PS1 for zsh +elif [ -n "$ZSH_VERSION" ]; then + PS1='%m:%~%# ' +# set up fallback default PS1 +else + : "${HOSTNAME:=$(hostname)}" + PS1='${HOSTNAME%%.*}:$PWD' + [ "$(id -u)" -eq 0 ] && PS1="${PS1}# " || PS1="${PS1}\$ " +fi + for script in /etc/profile.d/*.sh ; do - if [ -r $script ] ; then - . $script - fi + if [ -r "$script" ] ; then + . "$script" + fi done +unset script |