[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/local



On Fri, Feb  4, 2000 at 07:21:26 -0700 (+0000), Alan Post wrote:
> On Fri, Feb 04, 2000 at 01:14:02PM +0100, Santiago Vila wrote:
[snip]
> > base-files creates /usr/local and empty dirs under /usr/local but only if
> > /usr/local does not exist (maybe some other package removed /usr/local?)
> > 
> 
> This is not quite true, as your code actually checks if /usr/local is a
> directory:
> 
> if [ ! -d /usr/local ]; then
[snip]
> 
> This condition will fail when /usr/local is a symlink and proceed to populate
> it.


Wrong - it will still work as long as the symlink points to a directory
(same applies to perl's -d):

[2]wyvern:~$ ln -s /etc foobar
[2]wyvern:~$ [ -d foobar ] && echo directory
directory


Adrian

email: adrian.bridgett@iname.com,    http://www.poboxes.com/adrian.bridgett
Windows NT - Unix in beta-testing.   PGP key available on public key servers
Debian GNU/Linux  -*-   because I'm allergic to Prozac   -*-  www.debian.org


Reply to: