diff options
author | James Buren <ryuo@frugalware.org> | 2012-01-22 12:56:24 -0600 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2012-01-23 09:59:35 +0100 |
commit | e38fcc86086d62dfdcd776728b77d7d7acb20b80 (patch) | |
tree | 9941bcdc83e67db9cf4ccb9634a7db5b8399ed4a /modules.d/50plymouth | |
parent | b93aaba84f8cfaaf7f8e07fc23935c80d9e87e20 (diff) | |
download | dracut-e38fcc86086d62dfdcd776728b77d7d7acb20b80.tar.gz dracut-e38fcc86086d62dfdcd776728b77d7d7acb20b80.tar.bz2 dracut-e38fcc86086d62dfdcd776728b77d7d7acb20b80.zip |
plymouth: add xz support for kernel modules
This rewrites a portion of the module to support xz, as well as allow
an easier expansion should future compression methods for kernel
modules ever materialize.
Diffstat (limited to 'modules.d/50plymouth')
-rwxr-xr-x | modules.d/50plymouth/module-setup.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh index eedc8422..b78c718b 100755 --- a/modules.d/50plymouth/module-setup.sh +++ b/modules.d/50plymouth/module-setup.sh @@ -14,8 +14,13 @@ depends() { installkernel() { local _modname # Include KMS capable drm drivers - for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do - if zgrep -q drm_crtc_init $_modname; then + for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' -o -name '*.ko.xz' \) 2>/dev/null); do + case $_modname in + *.ko) grep -q drm_crtc_init $_modname ;; + *.ko.gz) zgrep -q drm_crtc_init $_modname ;; + *.ko.xz) xzgrep -q drm_crtc_init $_modname ;; + esac + if test $? -eq 0; then # if the hardware is present, include module even if it is not currently loaded, # as we could e.g. be in the installer; nokmsboot boot parameter will disable # loading of the driver if needed |