merge r13914 to 8.09
authorFelix Fietkau <nbd@openwrt.org>
Wed, 7 Jan 2009 04:39:42 +0000 (04:39 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 7 Jan 2009 04:39:42 +0000 (04:39 +0000)
SVN-Revision: 13915

package/base-files/files/etc/profile

index e82408ff83516ec989622e50051a5af945d9fec3..1f680655f71167fbff8acb5796671c737a212992 100644 (file)
@@ -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