delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Tue, 30 Nov 2004 12:37:44 -0500 (EST) |
From: | "William R. Knox" <wknox AT mitre DOT org> |
To: | cygwin AT cygwin DOT com |
Subject: | Patch to /etc/profile to deal with $HOME with a space |
Message-ID: | <Pine.GSO.4.58.0411301227340.2020@orne> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
I have just set up Cygwin, and noticed that my default home was under my "Documents and Settings" directory (not yet having run mkpasswd). However, the /etc/profile setup which tries to only create the warning message about running mkpasswd and mkgroup once can't deal with a HOME environment variable with a space in it. Here is a patch to allow that to work: --- /etc/profile 2004-11-26 14:53:34.477082000 -0500 +++ /etc/profile 2004-11-30 11:22:32.175340300 -0500 @@ -194,10 +194,10 @@ echo "and can be safely ignored." # only display the above once - cp -f /etc/group ${HOME}/group.mkgroup_l_d \ + cp -f /etc/group "${HOME}/group.mkgroup_l_d" \ && ( [ -w /etc/group ] || chmod --silent a+w /etc/group ; )\ - && sed -e 's/^mkgroup_l_d/mkgroup-l-d/' ${HOME}/group.mkgroup_l_d > /etc/grou p \ + && sed -e 's/^mkgroup_l_d/mkgroup-l-d/' "${HOME}/group.mkgroup_l_d" > /etc/gr oup \ && chmod --silent --reference=/etc/passwd /etc/group - rm -f ${HOME}/group.mkgroup_l_d + rm -f "${HOME}/group.mkgroup_l_d" ;; esac Bill Knox Lead Operating Systems Programmer/Analyst The MITRE Corporation -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |