Messages in this thread | | | Date | Thu, 27 Jul 2000 22:33:36 +0200 | From | Jamie Lokier <> | Subject | Re: 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/
| |