summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/root-.profile14
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