From 2a87e66bf718f86eb435ae456111e8c8771cc10d2bc75b036c3cf8e00ce87ba3 Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Fri, 18 Apr 2014 10:32:15 +0000 Subject: [PATCH] Accepting request 230213 from home:michal-m:branches:Base:System - weak-modules2: Use lsinitrd to list the modules in an initrd, so that initrds with early microcode work (bnc#873209, bnc#873113). OBS-URL: https://build.opensuse.org/request/show/230213 OBS-URL: https://build.opensuse.org/package/show/Base:System/suse-module-tools?expand=0&rev=15 --- suse-module-tools.changes | 6 ++++++ weak-modules2 | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/suse-module-tools.changes b/suse-module-tools.changes index 677682f..b3c04ac 100644 --- a/suse-module-tools.changes +++ b/suse-module-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 15 14:32:55 UTC 2014 - mmarek@suse.cz + +- weak-modules2: Use lsinitrd to list the modules in an initrd, so + that initrds with early microcode work (bnc#873209, bnc#873113). + ------------------------------------------------------------------- Fri Apr 4 14:32:48 UTC 2014 - mmarek@suse.cz diff --git a/weak-modules2 b/weak-modules2 index 835864f..0ea7354 100644 --- a/weak-modules2 +++ b/weak-modules2 @@ -75,7 +75,7 @@ doit() { } filter_basenames() { - sed -rn 's:/?lib/modules/.*/([^/]*\.ko)$:\1:p' + sed -rn 's:.*\/dev/null; printf '%s.ko\n' $INITRD_MODULES) | sort -u)) + local initrd_basenames=($( (lsinitrd /boot/initrd-$krel | filter_basenames; INITRD_MODULES=; . /etc/sysconfig/kernel &>/dev/null; printf '%s.ko\n' $INITRD_MODULES) | sort -u)) local i=($(join <(printf '%s\n' "${changed_basenames[@]}") \ <(printf '%s\n' "${initrd_basenames[@]}") )) log "changed initrd modules for kernel $krel: ${i[@]-none}"