projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a00d5
)
fix $HOME in /etc/profile (#4424)
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 7 Jan 2009 04:38:57 +0000
(
04:38
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 7 Jan 2009 04:38:57 +0000
(
04:38
+0000)
SVN-Revision: 13914
package/base-files/files/etc/profile
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/profile
b/package/base-files/files/etc/profile
index e82408ff83516ec989622e50051a5af945d9fec3..1f680655f71167fbff8acb5796671c737a212992 100644
(file)
--- a/
package/base-files/files/etc/profile
+++ b/
package/base-files/files/etc/profile
@@
-2,7
+2,8
@@
[ -f /etc/banner ] && cat /etc/banner
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-export HOME=/root
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '
[ -x /bin/more ] || alias more=less