This is the mail archive of the cygwin-apps 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: base-files: Does not permit the use of symlinks in /etc/profile.d/


On Sat, September 17, 2005 2:35 pm, Corinna Vinschen wrote:
> On Sep 17 07:19, Eric Blake wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> According to Max Bowsher on 9/16/2005 4:27 PM:
>> > The current /etc/profile does not permit the use of symlinks in
>> > /etc/profile.d/ - it ignores them.
>> >
>> > Unfortunately, even if this was fixed in the package, existing
>> installs
>> > wouldn't get fixed, because /etc/profile is handled via /etc/defaults
>> :-(
>> >
>> > /me gives up on finding a way for /sbin/alternatives to influence
>> $MANPATH.
>>
>> Here's my idea - add a /etc/profile/symlinkhandler.sh that detects
>> whether
>> /etc/profile has been patched yet, and if not, source all the symlinks
>> in
>> /etc/profile.  Now which package should provide that (alternatives vs.
>> base-files vs. something else), I'm not sure.  But you are also right
>> that
>> base-files should be patched to source links to regular files as well as
>> regular files.  One idea is to change that the appropriate line in
>> /etc/default/etc/profile from 'if [ -f "${f}" ]' to 'if [ ! -d "$f/" ]'.
>
> I'm wondering if base-files can't check if /etc/profile has been changed,
> for instance, using md5sum.  Then it could overwrite the file if it's
> still
> the original version, or, if it has been changed, move it away to, for
> instance, /etc/profile.SAV or something.

The preremove part of base-files could be modified to rename any of the
files that have been modified (if they haven't then they are deleted ready
for the post-install routine to install new versions) - although I don't
know if it's desirable behaviour.  I'm not sure if I'd be terribly happy
to have cygwin just rename my customisations out of the way, would be
*highly* confusing the first (at least!) time it happened...

J.


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