Bug 60065 - RFE: environment passthrough for kickstart
Summary: RFE: environment passthrough for kickstart
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael Fulbright
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-19 16:48 UTC by Nigel Metheringham
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-02-19 17:33:24 UTC
Embargoed:


Attachments (Terms of Use)
patch to pass through environment for RH7.2/anaconda 7.2-7 (3.74 KB, patch)
2002-02-19 16:49 UTC, Nigel Metheringham
no flags Details | Diff

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.


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