On Wed, Oct 14, 2015 at 10:39 AM, Laurent Bercot <[email protected]> wrote:
> On 14/10/2015 18:47, Buck Evan wrote: > >> I have a pretty extensive test suite for my system that's built atop s6, >> and the only part that explodes is the access of leapseconds.dat >> > > What about access to libexec binaries such as s6lockd-helper or > s6-rc-oneshot-run? > Yes, I see that s6lockd-helper is in libexec; it won't be found. I don't see s6-rc-oneshot-run. I assume that's in the separate s6rc project, which I haven't installed. Run-time prefixing is manageable with dynamic libraries, with PATH, with specifically designed runtimes such as Python, but it's just not > doable in the general case ... In my bash scripts, which do need to be runtime-relocatable, since they're designed to be run directly from a git checkout, I always have something akin to: HERE=$(dirname $(readlink -f $0)) config=$HERE/../etc/leapseconds.dat Certainly readlink -f isn't a cheap operation, but dirname is a simple string manipulation. This does seem to work in the general case, and I feel sure I could come up with something that's both quite efficient and correct in the edge cases if I spent some time on the problem. > ... it seems to me you're trying to cram a > square peg into a round hole here. Oh, definitely. But it's *so close* to fitting!
