]> git.ipfire.org Git - thirdparty/dracut.git/commit
Introduce tri-state hostonly mode
authorKairui Song <kasong@redhat.com>
Wed, 4 Jul 2018 09:21:37 +0000 (17:21 +0800)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 5 Jul 2018 07:14:02 +0000 (09:14 +0200)
commita695250ec7db21359689e50733c6581a8d211215
tree2b43d06c79d101afd3bae61c2f12c53525f80632
parent6ccb58a5b6bb684f5a20a5f32822bb8b118d4100
Introduce tri-state hostonly mode

Add a new option --hostonly-mode which accept an <mode> parameter, so we have a tri-state hostonly mode:

    * generic: by passing "--no-hostonly" or not passing anything.
               "--hostonly-mode" has no effect in such case.
    * sloppy: by passing "--hostonly --hostonly-mode sloppy". This
              is also the default mode when only "--hostonly" is given.
    * strict: by passing "--hostonly --hostonly-mode strict".

Sloppy mode is the original hostonly mode, the new introduced strict
mode will allow modules to ignore more drivers or do some extra job to
save memory and disk space, while making the image less portable.

Also introduced a helper function "optional_hostonly" to make it
easier for modules to leverage new hostonly mode.

To force install modules only in sloppy hostonly mode, use the form:

hostonly="$(optional_hostonly)" instmods <modules>

Signed-off-by: Kairui Song <kasong@redhat.com>
dracut-init.sh
dracut.sh