From: James Buren Date: Sun, 22 Jan 2012 18:56:24 +0000 (-0600) Subject: plymouth: add xz support for kernel modules X-Git-Tag: 015~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e38fcc86086d62dfdcd776728b77d7d7acb20b80;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh index eedc84229..b78c718be 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