From 2817345084849fcc0231910b52146f206164bdd6 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 12 Mar 2013 20:38:08 -0400 Subject: mkinitcpio: honor updates directory for firmware This also removes a check which would have otherwise hidden a missing firmware error from the user. FS#34255. Signed-off-by: Dave Reisner --- functions | 7 +++++-- mkinitcpio | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/functions b/functions index 7c0e64d..432d700 100644 --- a/functions +++ b/functions @@ -346,8 +346,11 @@ add_module() { map add_module "${deps[@]}" ;; firmware) - if [[ -e /usr/lib/firmware/$value ]]; then - add_file "/usr/lib/firmware/$value" "/usr/lib/firmware/$value" 644 + # ensure that we favor updated firmware files + if [[ -f $_d_firmware/updates/$value ]]; then + add_file "$_d_firmware/updates/$value" "$_d_firmware/updates/$value" 644 + else + add_file "$_d_firmware/$value" "$_d_firmware/$value" 644 fi ;; esac diff --git a/mkinitcpio b/mkinitcpio index abaa5e1..974d12c 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -14,6 +14,7 @@ _f_functions=functions _f_config=mkinitcpio.conf _d_hooks="$PWD/hooks:/usr/lib/initcpio/hooks:/lib/initcpio/hooks" _d_install="$PWD/install:/usr/lib/initcpio/install:/lib/initcpio/install" +_d_firmware=/usr/lib/firmware _d_presets=mkinitcpio.d # options and runtime data -- cgit v1.2.3-24-g4f1b