From d8d52f030f8efc16447cf834fabfc8923fcdf407 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 27 Mar 2009 10:35:20 +0100 Subject: hook-functions: Add firmware from versioned directories too. First see if there is a $(uname -r) versioned firmware around and if there is add it first. should make ubuntu sync easier too, as they shipp their firmware there. (closes: #521370) --- hook-functions | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'hook-functions') diff --git a/hook-functions b/hook-functions index d24df58..e549c81 100644 --- a/hook-functions +++ b/hook-functions @@ -62,13 +62,15 @@ manual_add_modules() continue fi for firmware in $firmwares; do - if [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then + if [ -e "${DESTDIR}/lib/firmware/${firmware}" ] \ + || [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ]; then continue fi # Only print warning for missing fw of loaded module # or forced loaded module - if [ ! -e "/lib/firmware/${firmware}" ]; then + if [ ! -e "/lib/firmware/${firmware}" ] \ + && [ ! -e "/lib/firmware/${version}/${firmware}" ]; then if grep -q "^$(basename "${mam_x}" .ko)[[:space:]]" \ /proc/modules \ || grep -q "^$(basename "${mam_x}" .ko)" \ @@ -83,7 +85,11 @@ manual_add_modules() copy_exec /lib/udev/firmware.agent fi - copy_exec "/lib/firmware/${firmware}" + if [ -e "/lib/firmware/${version}/${firmware}" ]; then + copy_exec "/lib/firmware/${version}/${firmware}" + else + copy_exec "/lib/firmware/${firmware}" + fi if [ "${verbose}" = "y" ]; then echo "Adding firmware ${firmware}" fi -- cgit v1.2.3