[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tiger-devel] [RFC] New check_path module.
From: |
Ryan Bradetich |
Subject: |
[Tiger-devel] [RFC] New check_path module. |
Date: |
Wed, 17 Sep 2003 00:33:13 -0600 |
Hello all,
I have tried a different approach for the check_path module that
attempts to parse the PATH environment variable. I looked into this
module because I noticed the PATH was not properly parsed on HP-UX as
shown below (both modules were run with on the same system on the root
user):
check_path (old):
DIR: /bin
DIR: /usr/bin
DIR: /usr/sbin
check_path (new):
DIR: /opt/fcms/bin
DIR: /opt/graphics/common/bin
DIR: /opt/hparray/bin
DIR: /opt/nettladm/bin
DIR: /opt/pb/bin
DIR: /opt/pd/bin
DIR: /opt/perf/bin
DIR: /opt/perl/bin
DIR: /opt/pwplus/bin
DIR: /opt/resmon/bin
DIR: /opt/scr/bin
DIR: /opt/sec_mgmt/bastille/bin
DIR: /opt/socks/bin
DIR: /opt/upgrade/bin
DIR: /sbin
DIR: /usr/bin
DIR: /usr/bin/X11
DIR: /usr/ccs/bin
DIR: /usr/contrib/bin
DIR: /usr/contrib/bin/X11
DIR: /usr/sbin
The new check_path module deals with different methods for adding
directores to the PATH environment variable such as:
PATH="/opt/*/bin:$HOME/bin:$(cat /etc/PATH)"
In addition to the added directory checks, I also added some additional
optimizations:
- Only parse the system PATH's once (not once for every user).
- Resolve directory symlinks (i.e. HP-UX has /bin -> /usr/bin).
- Only parse directories once (i.e. handle: PATH=/bin:/bin")
- Remove the system directories from the user's path when
parsing
the user's path (they have already been searched once).
- etc.
Does this look like a good approach?
P.S. This module is probably not complete, I am still working on how ton
integrate the embedded_check stuff.
Comments/patches welcome :)
Thanks,
- Ryan
check_path.new
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tiger-devel] [RFC] New check_path module.,
Ryan Bradetich <=