Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2011 10:13:48 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223005 - head/bin/sh
Message-ID:  <201106121013.p5CADmjp018247@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106121013.p5CADmjp018247>