lkml.org 
[lkml]   [2000]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RLIM_INFINITY inconsistency between archs
Theodore Y. Ts'o wrote:
> > + mkdir -p $$MODLIB; \
> > + rm -f $$MODLIB/build; \
> > + ln -s `pwd` $$MODLIB/build; \
>
> If $$MODLIB already exists and is a directory, you'll be creating a
> link inside that directory which is probably not what you want.
> Perhaps:
>
> test -e $$MODLIB/build || ln -s `pwd` $$MODLIB/build
>
> Umm, did you notice the "rm -f" command before the "ln -s"?

Yes. That won't delete a *directory*.

> This was to take care of the case where $$MODLIB/build exists, but
> doesn't (necessarily) point to the right place. In your suggested case,
> if $$MODLIB/build is present by points to the wrong location, it won't
> get fixed.

My line is to replace only your last line. The rm -f should remain.
The "test -e" is in case $$MODLIB/build is a real directory, as opposed
to a symbolic link.

You might consider "rm -rf" for the second line instead.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.072 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site