summaryrefslogtreecommitdiff
path: root/aports/base-layout/profile
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:47:25 +0100
committerPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:47:25 +0100
commit1c1b02874e1749d61b9b1680f744bf8470147416 (patch)
tree90578f8f7b73792dd41129b71bc73b0eefd81d32 /aports/base-layout/profile
parent1b300a88b562f707ccd1b67229bd878930c9766c (diff)
downloadfreebsd-wifibox-alpine-1c1b02874e1749d61b9b1680f744bf8470147416.zip
Move to Linux 5.15.85 + Alpine 3.17.0.
Diffstat (limited to 'aports/base-layout/profile')
-rw-r--r--aports/base-layout/profile22
1 files changed, 10 insertions, 12 deletions
diff --git a/aports/base-layout/profile b/aports/base-layout/profile
index fd7506b..e62587b 100644
--- a/aports/base-layout/profile
+++ b/aports/base-layout/profile
@@ -22,20 +22,18 @@ export PATH
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