home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: karish@mindcraft.com (Chuck Karish)
-
- In article <1991Jul17.195136.29019@uunet.uu.net> brnstnd@KRAMDEN.ACF.NYU.EDU
- (Dan Bernstein) writes:
- >Under BSD, you can easily set up a /inst/bin directory with symlinks to
- >every officially ``installed'' executable. Users can then have /inst/bin
- >in their paths instead of all the physical directories like /bin, /etc,
- >/usr/bin, /usr/ucb, etc. Although the directory is large, the time for
- >several failing execve()s is much larger than the time for searching one
- >directory (especially with path caching as in BSD 4.3).
-
- This might be a workable optimization on some implementations.
- I don't see the significance to standards of the
- implementation details of your shell. There's no reason why a
- shell has to find a utility by trial and error.
-
- >Anyway, as vendors haven't come to any agreement on this facility---the
- >current ``standard'' is to install most programs somewhere under
- >/usr/local, with new subdirectories for big programs like ingres---I
- >despise POSIX's attempts to name any particular solution a ``standard.''
- >In the interests of security, efficiency, and backwards compatibility, I
- >propose /inst/bin as a viable alternative to getconf. I suggest that
- >POSIX look---and take its time looking---before it leaps.
-
- Dan, do you really understand what getconf does? I fail to see
- how its use (properly protected) can make any program less
- portable. It's a utility to return information about system
- limits and options, only one of which is a path. It's the
- POSIX.2 utility-level interface to the C functionality provided
- by sysconf() and pathconf(). A blanket condemnation of getconf
- based on your idea of the correct default path for installing
- third-party software is nonsensical.
-
- If your complaint is that the definition of _CS_PATH will
- prevent the system administrator from performing the
- optimization you suggest, I don't think you've thought the
- problem through. If you want programs, including
- vendor-supplied shell scripts, to use /inst/bin, move the
- vendor-supplied getconf aside and provide your own version that
- supplies your path for _CS_PATH and calls the original getconf
- for other values.
-
- If vendors use "getconf _CS_PATH" consistently, they'll make it
- easier for you to implement your scheme. Changing getconf will
- optimize PATH searching for all the system's scripts, as well
- as for your interactive users. No hacking required when you
- install a new release, either.
-
-
- A puzzle for the reader (maybe this is obvious to everyone but
- me): How can a shell script determine whether it's running on
- a POSIX.2 system? If it calls getconf and getconf does not
- exist, the shell may exit. It could call getconf in a
- subshell, but that's ugly and expensive.
- --
-
- Chuck Karish karish@mindcraft.com
- Mindcraft, Inc. (415) 323-9000
-
- Volume-Number: Volume 24, Number 51
-
-