Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kargs.d directories for default kargs #1836

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 21, 2019

  1. lib/kargs: Parse quoted karg values

    Instead of splitting a string of kargs with a space as the
    separator, parse the string and allow spaces that are protected
    by quotes in the karg value.
    
    The next_arg() function is based on the implementation in the
    Linux kernel: https://github.com/torvalds/linux/blob/8a05452ca460b05c985eadc7b5a4f040f124463e/lib/cmdline.c#L204
    Robert Fairley committed May 21, 2019
    Configuration menu
    Copy the full SHA
    7f59180 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2019

  1. Support kargs.d directories for default kargs

    Add the following config directories for setting default kernel
    arguments:
    
    /etc/ostree/kargs.d (host config)
    /usr/lib/ostree-boot/kargs.d (base config)
    
    These directories contain files whose contents consist of a karg
    snippet, which is a collection kernel parameter keys and values.
    Example of a snippet:
    
    ```
    KEY=FOO KEYFLAG ANOTHERKEY=VALUE1 ANOTHERKEY=VALUE2
    ```
    
    Snippets are read in alphanumeric order of the karg snippet filename
    when generating the final kernel options from the host and base config
    directories. Ordering may be specified by prefixing a number, e.g.
    `/etc/ostree/kargs.d/4000_localhost`.
    
    The bootconfig key `ostree-kargs-generated-from-config` indicates
    whether the kargs were generated by ostree from the kargs.d directories
    (`true`), or copied from the previous deployment (`false`). Editing the
    kargs through the command line (e.g. `ostree admin deploy --karg=`) will
    set the flag to `false`, and kargs will be copied from the previous
    deployment for subsequent deployments.
    
    Also add support for `ostree admin instutil set-kargs` so that installer
    programs using this command (such as Anaconda) remain managed by the
    kargs.d directories from the first deployment.
    
    Closes: ostreedev#479
    Robert Fairley committed May 24, 2019
    Configuration menu
    Copy the full SHA
    e1d2e47 View commit details
    Browse the repository at this point in the history