>> When is the following line from /etc/profile
>> export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
>> ever useful?

> if $USER != 'root' ?

I use many users other than `root' on my OpenWRT machine and have never
needed the above line.  So if that can be useful, it's not just when
"user != root".

> or $USER is unset - is this possible at this stage?

- HOME being improperly set is very rare (my question is trying to figure
  out when/if it can ever happen).
- HOME being unset is even more rare.
- USER being unset is also very rare (tho, IIUC there are systems (HP-UX
  maybe?) where it's not set, since IIRC some versions of POSIX only
  requires LOGNAME and not USER).


-- Stefan

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

Reply via email to