diff options
author | maximilian attems <maks@debian.org> | 2009-03-27 10:35:20 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2009-03-29 19:31:53 +0200 |
commit | d8d52f030f8efc16447cf834fabfc8923fcdf407 (patch) | |
tree | 5bcad7f66a1d19dd101cce336f9a8808a6294164 | |
parent | 198f3485f2858e882e0cc4eb449a5c471fb0b543 (diff) | |
download | initramfs-tools-d8d52f030f8efc16447cf834fabfc8923fcdf407.tar.gz initramfs-tools-d8d52f030f8efc16447cf834fabfc8923fcdf407.zip |
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)
-rw-r--r-- | hook-functions | 12 |
1 files changed, 9 insertions, 3 deletions
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 |