Re: running scripts before x-server starts



Cameron Hutchison wrote:

Karl Auer wrote:

The orginal poster wants to do stuff in those scripts depending on what
GRUB options were selected.

Finding the right script to do it in is only half the solution: How is
information passed out of GRUB about what options were selected?

The simplest way is probably to parse /proc/cmdline in the script. Grub
can set arbitrary options on the kernel command line.

You can define multiple boot stanzas in /boot/grub/menu.lst with
different options in each stanza.

Run "cat /proc/cmdline" and compare the result with the contents of
/boot/grub/menu.lst to see what I mean.

Well, I'd say the _simplest_ way is to just set the runlevel in the grub
stanzas, but yours is more flexible.
--
derek


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: running scripts before x-server starts
    ... GRUB options were selected. ... The simplest way is probably to parse /proc/cmdline in the script. ... You can define multiple boot stanzas in /boot/grub/menu.lst with ...
    (Ubuntu)
  • Re: Changing Run levels
    ... > 1) From the main screen, highlight the kernel you want to boot and press ... > default stanzas), and press 'e' again. ... in GRUB before so I really needed to know how. ...
    (Fedora)