determine VGA vs. ttyS* console in %pre ?

Steve Rikli sr at genyosha.net
Fri Dec 8 21:12:25 UTC 2006


In article <45776CB8.4070506 at herakles.homelinux.org>,
John Summerfield  <kickstart-list at redhat.com> wrote:
>Steve Rikli wrote:
>> In article <y9hvekomyu9.fsf at lime.ircam.fr>,
>> Arnaud Gomes-do-Vale  <kickstart-list at redhat.com> wrote:
>>>sr at genyosha.net (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 at genyosha.net         |||                                         ||




More information about the Kickstart-list mailing list