delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/10/12:42:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: Fri, 10 Jan 2003 12:42:31 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: postinstall/profile.sh: pls consider testing for preexisting symbolic link
Message-ID: <20030110174231.GB26102@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <200301101657 DOT h0AGv3c25610 AT tigris DOT pounder DOT sol DOT net>
Mime-Version: 1.0
In-Reply-To: <200301101657.h0AGv3c25610@tigris.pounder.sol.net>
User-Agent: Mutt/1.5.1i

On Fri, Jan 10, 2003 at 10:57:03AM -0600, nicebounce AT trodman DOT com wrote:
>--------
>
>how about:
>
>  if [ ! -f "/etc/profile" -a ! -L "/etc/profile"]; then
>    cp -a /etc/profile.default /etc/profile
>  fi
>
>Rightly or wrongly I setup /etc/profile as a symblic link to
>a network drive version of profile, so that several hosts
>share the same file.  The postinstall/profile.sh leaves the
>link but then copies in the default profile, so I have to manually
>delete it.
>
>So, in general should there be a check for a symbolic link also
>as shown above.
>
>Just a thought.

It's a good thought, but, IMO, it probably should just be a '-e' check
rather than a '-f' check.  If someone wants to create a profile
directory, they should be allowed to do that, too.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019