When is the following line from /etc/profile

  export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)

ever useful?

Usually /etc/profile expects HOME to be properly setup already and in my
experience, the software installed in OpenWRT does indeed set it
up properly.
So I'd recommend the patch below.


        Stefan


Index: package/base-files/files/etc/profile
===================================================================
--- package/base-files/files/etc/profile        (révision 14043)
+++ package/base-files/files/etc/profile        (copie de travail)
@@ -2,7 +2,6 @@
 [ -f /etc/banner ] && cat /etc/banner
 
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
 export HOME=${HOME:-/root}
 export PS1='\...@\h:\w\$ '
 

_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to