-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
rhel-9.4.z
-
None
-
None
-
Moderate
-
FutureFeature
-
rhel-sst-filesystems
-
ssg_filesystems_storage_and_HA
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
A customer has made a feature request for the following:
A parent process should be able to set a key:value pair which would be inherited by all subsequent child processes (and their child processes, and so on) such that a symbolic link which had the key embedded in its text would have the value substituted on the fly on each access, thus allowing the link to dynamically point to different places depending on context.
It’s important that the child processes themselves do not know this is happening unless they explicitly check. If no value is available for a key found in a link then return “Path not found”.
Background: This is functionality which existed in the Aegis OS during the 1980s. It was very useful at the time and I recently came across a problem on our own systems which had no good solution but which would have been trivially easy to solve if this functionality had been available
Use case: In Aegis, one use was to allow the use of BSD or System V Unix utilities with the same names but different behaviour, depending on personal preference, with the minimum of fuss.
Please provide the package NVR for which bug is seen:
New feature request
How reproducible:
Steps to reproduce
The customer suggests the following regarding implementation:
In Aegis, this was done quite simply by setting a normal environment variable, and including the text ${<variable-name>} in the symbolic link text for example
“/usr/bin” -> “/usr/bin/${UNIXVER}”
export UNIXVER=BSD4.2"
a new utility could facilitate this functionality, for example:
ln –s “/usr/bin/${UNIXVER}” “/usr/bin”
lnvar create UNIXVER values=BSD4.2,SYSV default=BSD4.2 <= Create variable, done once on system, or done once per user, so every user could have their own set
lnvar set UNIXVER BSD4.2 <= Set variable
lnvar show UNIXVER <= Show values available for UNIXVER, its default, and what it is currently set to
lnvar list <= show all variables available , their possible values, and defaults if not explicitly set for a process
lnvar destroy UNIXVER <= Remove a possible variable from the system"