forked from pool/suse-module-tools
Accepting request 230736 from Base:System
- weak-modules2: Use lsinitrd to list the modules in an initrd, so that initrds with early microcode work (bnc#873209, bnc#873113). (forwarded request 230213 from michal-m) OBS-URL: https://build.opensuse.org/request/show/230736 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suse-module-tools?expand=0&rev=10
This commit is contained in:
commit
82011d2f24
@ -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
|
Fri Apr 4 14:32:48 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ doit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
filter_basenames() {
|
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
|
# Name of the symlink that makes a module available to a given kernel
|
||||||
@ -297,8 +297,7 @@ uncomp() {
|
|||||||
xz -cd "$file"
|
xz -cd "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# test if mkinitrd is needed for $krel. This should be decided by initrd itself
|
# test if mkinitrd is needed for $krel.
|
||||||
# actually
|
|
||||||
# stdin - list of changed modules ("_kernel_" for the whole kernel)
|
# stdin - list of changed modules ("_kernel_" for the whole kernel)
|
||||||
needs_mkinitrd() {
|
needs_mkinitrd() {
|
||||||
local krel=$1
|
local krel=$1
|
||||||
@ -327,7 +326,7 @@ needs_mkinitrd() {
|
|||||||
if [ ! -e /boot/initrd-$krel ]; then
|
if [ ! -e /boot/initrd-$krel ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
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[@]}") \
|
local i=($(join <(printf '%s\n' "${changed_basenames[@]}") \
|
||||||
<(printf '%s\n' "${initrd_basenames[@]}") ))
|
<(printf '%s\n' "${initrd_basenames[@]}") ))
|
||||||
log "changed initrd modules for kernel $krel: ${i[@]-none}"
|
log "changed initrd modules for kernel $krel: ${i[@]-none}"
|
||||||
|
Loading…
Reference in New Issue
Block a user