Bug 60065 - RFE: environment passthrough for kickstart
RFE: environment passthrough for kickstart
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Fulbright
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2002-02-19 11:48 EST by Nigel Metheringham
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-19 12:33:24 EST
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 pass through environment for RH7.2/anaconda 7.2-7 (3.74 KB, patch)
2002-02-19 11:49 EST, Nigel Metheringham
no flags Details | Diff

  None (edit)
Description Nigel Metheringham 2002-02-19 11:48:27 EST
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 11:49:27 EST
Created attachment 46040 [details]
patch to pass through environment for RH7.2/anaconda 7.2-7
Comment 2 Jeremy Katz 2002-02-19 12:08:49 EST
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 12:33:20 EST
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 12:34:24 EST
/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.