svn commit: r223005 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Sun Jun 12 10:13:48 UTC 2011
Author: jilles
Date: Sun Jun 12 10:13:48 2011
New Revision: 223005
URL: http://svn.freebsd.org/changeset/base/223005
Log:
sh: Read .profile from the home directory (or / if HOME is not set).
In most cases, login shells are started from the home directory, but not in
all, such as xterm -ls.
This commit depends on r222957 for read_profile() performing parameter
expansion.
PR: bin/50569
Modified:
head/bin/sh/main.c
Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c Sun Jun 12 09:18:48 2011 (r223004)
+++ head/bin/sh/main.c Sun Jun 12 10:13:48 2011 (r223005)
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
state1:
state = 2;
if (privileged == 0)
- read_profile(".profile");
+ read_profile("${HOME-}/.profile");
else
read_profile("/etc/suid_profile");
}
More information about the svn-src-all
mailing list