diff options
author | Miles Bader <miles@gnu.org> | 1996-07-17 21:18:58 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-17 21:18:58 +0000 |
commit | 144e07bfe181994e048197119f6cd1456661ddad (patch) | |
tree | 697d1adddf9dbf329a0d48007cd7c409d7821024 /config | |
parent | f2f014995a4bbf710c6185969052c2e7e10a8b43 (diff) |
Fixup test and source of user's .root_profile.
Diffstat (limited to 'config')
-rw-r--r-- | config/root-.profile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/config/root-.profile b/config/root-.profile index 5bfd9833..5a2188db 100644 --- a/config/root-.profile +++ b/config/root-.profile @@ -1,7 +1,15 @@ # Execute the user's .root_profile file if it exists rather than this one. -if [ $USER && $USER != root ]; then - . ~USER/.root_profile +case "$USER" in + "" | root) + UHOME="";; + *) + UHOME="`eval echo ~$USER`";; +esac + +if [ "$UHOME" -a -r "$UHOME/.root_profile" ]; then + . "$UHOME/.root_profile" else - export PATH=/sbin:/bin:/local/bin + PATH=/sbin:/bin:/local/bin + export PATH fi |