From bb37200cfca3bae36406183728f9b0e5499d9f63 Mon Sep 17 00:00:00 2001 From: tokiclover Date: Tue, 30 Sep 2014 16:34:10 +0200 Subject: [PATCH] mkinitramfs-ll.{ba,z}sh: kernel module expression Fix kernel module extended regular expression, this previous **.ko could possible match unwanted module (e.g. video). So removed '*', now zsh will match '-*' more than and there is no way to do the same for bash script. So module should be explicitely listed for bash script. --- mkinitramfs-ll.bash | 2 +- mkinitramfs-ll.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkinitramfs-ll.bash b/mkinitramfs-ll.bash index 5195b71..e7ee7ff 100755 --- a/mkinitramfs-ll.bash +++ b/mkinitramfs-ll.bash @@ -425,7 +425,7 @@ function domod { local mod module ret for mod in "$*"; do declare -a modules - modules=($(find /lib/modules/${opts[-kv]} -name "*${mod}*.ko")) + modules=($(find /lib/modules/${opts[-kv]} -name "${mod}.ko")) if (( "${#modules[@]}" > 0 )); then for module in "${modules[@]}"; do mkdir -p .${module%/*} && cp -ar {,.}${module} || diff --git a/mkinitramfs-ll.zsh b/mkinitramfs-ll.zsh index 03c9818..78cd463 100755 --- a/mkinitramfs-ll.zsh +++ b/mkinitramfs-ll.zsh @@ -394,7 +394,7 @@ function domod { local mod module ret for mod ($*) { typeset -a modules - modules=(/lib/modules/${opts[-kv]}/**/*${mod}*.ko(.)) + modules=(/lib/modules/${opts[-kv]}/**/${mod}(|-*).ko(.)) if (( ${#modules} > 0 )) { for module (${modules}) mkdir -p .${module:h} && cp -ar {,.}${module} ||