Bug 60065

Summary: RFE: environment passthrough for kickstart
Product: [Retired] Red Hat Linux Reporter: Nigel Metheringham <nigel.metheringham>
Component: anacondaAssignee: Michael Fulbright <msf>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-19 17:33:24 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 pass through environment for RH7.2/anaconda 7.2-7 none

Description Nigel Metheringham 2002-02-19 16:48:27 UTC
We build boxes using kickstart.

Some boxes have a config already generated for them at build time, which can be
obtained from a local server, all the build process needs to get that config is
the box id.

So I have enhanced the init on the boot images to pass through some environment
variables to processes started off by init - basically all uppercase environment
variables are passed down the food chain.

This allows us to have a setup where you boot the machine off CD, get to the
syslinux prompt, and type
   dl380 ID=my-server

where dl380 is a syslinux.cfg entry which pulls in our kickstart stuff.

When the %postinstall runs, the environment variable entry ID=my-server is there
in the environment for scripts to make use of.   

The linux kernel passes unrecognised command line stuff to init so this passes
through that way.  The attached patch modifies the anaconda init to copy through
these extra environment variables.

I'm sure others can find similar uses for this... and its just a few lines :-)

Comment 1 Nigel Metheringham 2002-02-19 16:49:27 UTC
Created attachment 46040 [details]
patch to pass through environment for RH7.2/anaconda 7.2-7

Comment 2 Jeremy Katz 2002-02-19 17:08:49 UTC
Why do this via additional code in the loader?  You can just poke directly into
/proc/cmdline easily enough

Comment 3 Nigel Metheringham 2002-02-19 17:33:20 UTC
When I first tried this - couple of versions back - /proc/cmdline wasn't there
(/proc wasn't mounted into the installed image).  If /proc/cmdline is there now
then this fudge is redundant.

Will check tomorrow - hopefully when I can think straight without nasty
illnesses :-)


Comment 4 Michael Fulbright 2002-02-21 17:34:24 UTC
/proc/cmdline will be there. Please reopen this issue if it is not.