Bug 450426 - better environment handling for nash
better environment handling for nash
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-08 01:27 EDT by JW
Modified: 2009-05-06 11:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-06 11:12:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to improve nash's environment substitutions (1.61 KB, patch)
2008-06-08 01:27 EDT, JW
no flags Details | Diff

  None (edit)
Description JW 2008-06-08 01:27:12 EDT
Description of problem:
Current nash does very lame environment variable substitutions.
With a tiny amount of work, this can be improved enormously.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. export HOST=xyz
2. In nash script: "echo abc${HOST}def"
3. In nash script: "echo $HOST"  

Actual results:
2. abc${HOST}def
3. xyz

Expected results:
2. abcxyzdef
3. xyz

Additional info:
Given that grub boot parameters that are not interpreted by kernel are passed
through to the environment, it can sometime be useful for nash to be able to use
these during early init. For example, if a boot string has "kernel ...
root=LABEL=/ HOST=myhost", then nash's environment will contain "HOST=myhost".
And it is therefore possible to massively reconfigure an entire root filesystem,
specialized for a particular host, by simply having nash do "ln -s xxx
xxx.$HOST" or similar init script.

Very useful for people maintaining a large number of machines configured in a
number of distinct ways.  Boot off dvd and just chose the target HOST at boot.

Come to think of it, why does nash exist at all?  What is wrong with bash?
Comment 1 JW 2008-06-08 01:27:12 EDT
Created attachment 308636 [details]
patch to improve nash's environment substitutions
Comment 2 Bug Zapper 2008-11-26 05:49:49 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 3 Jeremy Katz 2009-05-06 11:12:54 EDT
nash is going away as we move to dracut; making big changes to allow more variable substitution isn't going to happen at this point

Note You need to log in before you can comment on or make changes to this bug.