Re: determine VGA vs. ttyS* console in %pre ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <45776CB8.4070506@xxxxxxxxxxxxxxxxxxxxxx>,
John Summerfield  <kickstart-list@xxxxxxxxxx> wrote:
>Steve Rikli wrote:
>> In article <y9hvekomyu9.fsf@xxxxxxxxxxxxx>,
>> Arnaud Gomes-do-Vale  <kickstart-list@xxxxxxxxxx> wrote:
>>>sr@xxxxxxxxxxxx (Steve Rikli) writes:
>>>
>>>>Is there a way during %pre to determine what the console is?
>>>
>>>The easiest (only?) way would be parsing /proc/cmdline.
>> 
>> Yes, excellent!   I ought to be able to make use of that -- thanks.
>
>I'm mildly confused... What you will see in the commandline is those 
>console arguments. It's how the kernel knows what to use.

Exactly -- and that's what I was after.

`grep console= /proc/cmdline` and playing sed games with a script
during %pre gives me the "console=<args>" stuff which was appended
to the kernel during PXE.

I.e. my script could return something like "ttyS0,9600n8" for a
serial console install, and "" for a VGA install.

That script in %pre builds a very simple %include file which contains
a "bootloader --append=<args>" string, which I then use in the general
section of ks.cfg .

One less bit of hardcoded data in all my ks.cfg files -- thanks to all!

cheers,
sr.
-- 
|| Steve Rikli             ||| It's kind of fun to do the impossible.  ||
|| Systems Administrator   |||                                         ||
||                         |||              - Walt Disney              ||
|| sr@xxxxxxxxxxxx         |||                                         ||


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux