diff options
author | Michael Prokop <mika@debian.org> | 2010-02-20 17:01:45 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-02-22 22:10:48 +0100 |
commit | 51de1be0a82967582b024dd554c02e457fe8e917 (patch) | |
tree | 238752779e715af5e079901d3541e299d9d409bc /hook-functions | |
parent | 836e5cf6ddb30757365c2b879b96958c250dcd7b (diff) | |
download | initramfs-tools-51de1be0a82967582b024dd554c02e457fe8e917.tar.gz initramfs-tools-51de1be0a82967582b024dd554c02e457fe8e917.zip |
hook-functions: Avoid firmware copy error.
Fix a2127d33 for systems without /proc/modules because the check has
the wrong logic order. (closes: #570678)
Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hook-functions b/hook-functions index 9d59dc1..8376be3 100644 --- a/hook-functions +++ b/hook-functions @@ -71,8 +71,13 @@ manual_add_modules() # Only print warning for missing fw of loaded module # or forced loaded module if [ ! -e "/lib/firmware/${firmware}" ] \ - && [ ! -e "/lib/firmware/${version}/${firmware}" ] \ - && [ -e /proc/modules ]; then + && [ ! -e "/lib/firmware/${version}/${firmware}" ] ; then + # Only warn about missing firmware if + # /proc/modules exists + if [ ! -e /proc/modules ] ; then + continue + fi + if grep -q "^$(basename "${mam_x}" .ko)[[:space:]]" \ /proc/modules \ || grep -q "^$(basename "${mam_x}" .ko)" \ |