Re: RLIM_INFINITY inconsistency between archs

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Jul 27 2000 - 15:33:36 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:24 EST