bash TERM variable different between LFS-4.1 and LFS-5.0

zoltan 6zoltan8 at
Sun May 16 18:48:16 PDT 2004

Kevin P. Fleming wrote:
> zoltan wrote:
>> Thank you...I just found it, I think.  Line 59 in src/shutdown.c seems 
>> to initialize the "clean_env" such that TERM=dumb.  Seems was this 
>> added starting with sysvinit-2.79.  Maybe I'll play around with it and 
>> see if changing it to TERM=linux does what I expect...
> No, it's only doing this because it's not getting a TERM setting from 
> the kernel, but it supposed to be. The reason it's not getting it is 
> because of a bug in sysvinit itself, it overwrites part of its environment.
> There is a patch on the patches project; look for 
> "sysvinit-1.85-proclen-1.patch" or something like that, it's a one line 
> fix.

The kernel is supposed to pass TERM?  I thought it was only supposed to 
pass CONSOLE.  At any rate, I have a cheezy hack that does what I want...

add the line:


into the spawn() routine in init.c at around the same place where all 
the other environment vars. get set up, and works.  Cheezy, 
but it works.  I'll check out the patch though...


More information about the lfs-support mailing list