Bug 450426

Summary: better environment handling for nash
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: dcantrell, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-06 15:12:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to improve nash's environment substitutions none

Description JW 2008-06-08 05:27:12 UTC
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):
mkinitrd-6.0.19-4

How reproducible:
Always

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 05:27:12 UTC
Created attachment 308636 [details]
patch to improve nash's environment substitutions

Comment 2 Bug Zapper 2008-11-26 10:49:49 UTC
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Jeremy Katz 2009-05-06 15:12:54 UTC
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