aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-baselayout/profile
diff options
context:
space:
mode:
Diffstat (limited to 'main/alpine-baselayout/profile')
-rw-r--r--main/alpine-baselayout/profile32
1 files changed, 16 insertions, 16 deletions
diff --git a/main/alpine-baselayout/profile b/main/alpine-baselayout/profile
index 45caac1d92e..fbc3ba0cd50 100644
--- a/main/alpine-baselayout/profile
+++ b/main/alpine-baselayout/profile
@@ -1,24 +1,24 @@
-export PATH="$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
umask 022
-# set up fallback default PS1
-: "${HOSTNAME:=$(hostname)}"
-PS1='${HOSTNAME%%.*}:$PWD'
-[ "$(id -u)" = "0" ] && PS1="${PS1}# "
-[ "$(id -u)" = "0" ] || PS1="${PS1}\$ "
-
# use nicer PS1 for bash and busybox ash
-[ -n "$BASH_VERSION" -o "$BB_ASH_VERSION" ] && PS1='\h:\w\$ '
-
+if [ -n "$BASH_VERSION" -o "$BB_ASH_VERSION" ]; then
+ PS1='\h:\w\$ '
# use nicer PS1 for zsh
-[ -n "$ZSH_VERSION" ] && PS1='%m:%~%# '
-
-# export PS1 as before
-export PS1
+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