This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to /etc/profile to deal with $HOME with a space

> On Tue, Nov 30, 2004 at 07:33:02PM -0000, John Morrison wrote:
>>> 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:
>>I'm away on a course at the moment and don't have access to the machine
>>with the files I use to generate the package.  I'll be back home on
>>Friday, I'll try and get something out over the weekend or by mid-week at
>>the latest.
> Since this has been a persistent problem, pretty much since the inception
> of base-files, can I request that you do an audit of everything in base
> files
> and quote all unquoted access to environment variables in the package?
> It seems like we just keep running across these problems in bits and
> pieces and
> maybe it's time for a concerted effort to wipe these types of problems
> out.


I did consider changing /etc/postinstall/ so that instead of

/bin/mkpasswd -l -c > /etc/passwd

it does

mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/' >

The reason the 'Doc and Settings' directory is appearing is because these
people are networked based and the flags to mkpasswd tell it to only check
the local machine.  It was talked about passing in the domain flag, but
ruled out because of the amount of time it would take if there were lots
of users or it was unable to contact a default domain (there may have been
other issues too, but they were the only ones I can remember).

Think it's worth it?

Anyway, I'll fix the profile quotes soonest.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]