From: Phil Packer (pep@wicked.demon.co.uk)
Date: 02/22/93


From: pep@wicked.demon.co.uk (Phil Packer)
Subject: [Q] How to add boot-time environment variables?
Date: 22 Feb 1993 13:49:22 GMT

Hi, chaps

I have a small kernel-hacking question and so far I've been unable to find
an answer; so I throw it open to the net:

I thought (in an idle moment) that it would be a good idea to detect the
MONITOR TYPE at startup and set an environment variable accordingly, as I
got fed up having to do ls --no-color when using my system with a mono VGA
monitor.

Thats easy I thought, ask the bios and then set things up in
~/linux/init/main.c accordingly.

So just as a test, I tried adding a third variable at the point in main.c
where it sets up envp_init and envp_rc and envp, and to my surprise, NOTHING
HAPPENED.

As a sanity check, I went in and altered the exisiting variable of TERM to
say something other than "TERM=console" and that worked...

So the question is "What else do I have to do to add extra boot-time
environment variables?"

I 'spect I'm being extremely foolish here and I'm overlooking the obvious!

All input gratefully recieved 8-^)

Phil

+-----------------------------+----------------------------------------------+
|Phil Packer | pep@wicked.demon.co.uk (home) |
|165 Stourton Avenue Hanworth | pep@cix.compulink.co.uk (home) |
|Middlesex, England TW13 6LD | pp1071bh.bbc-bh@radio.bbc.co.uk (someday) |
| 044 +81 898 0101 | PP1071BH@BBC-BH [via NHUB] (MHS) |
| #include <very_long_x400_address.h> |
| wicked is not associated with any other demon dial-up site |
+----------------------------------------------------------------------------+