forked from pool/suse-module-tools
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
This commit is contained in:
parent
f211d34948
commit
2a87e66bf7
@ -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
|
||||
|
||||
|
@ -75,7 +75,7 @@ doit() {
|
||||
}
|
||||
|
||||
filter_basenames() {
|
||||
sed -rn 's:/?lib/modules/.*/([^/]*\.ko)$:\1:p'
|
||||
sed -rn 's:.*\<lib/modules/.*/([^/]*\.ko)$:\1:p'
|
||||
}
|
||||
|
||||
# Name of the symlink that makes a module available to a given kernel
|
||||
@ -297,8 +297,7 @@ uncomp() {
|
||||
xz -cd "$file"
|
||||
}
|
||||
|
||||
# test if mkinitrd is needed for $krel. This should be decided by initrd itself
|
||||
# actually
|
||||
# test if mkinitrd is needed for $krel.
|
||||
# stdin - list of changed modules ("_kernel_" for the whole kernel)
|
||||
needs_mkinitrd() {
|
||||
local krel=$1
|
||||
@ -327,7 +326,7 @@ needs_mkinitrd() {
|
||||
if [ ! -e /boot/initrd-$krel ]; then
|
||||
return 0
|
||||
fi
|
||||
local initrd_basenames=($( (uncomp /boot/initrd-$krel | cpio -t --quiet | filter_basenames; INITRD_MODULES=; . /etc/sysconfig/kernel &>/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}"
|
||||
|
Loading…
Reference in New Issue
Block a user