[debian-edu-commits] debian-edu/ 01/01: Extend auto-addfirmware to also look in dmesg for requested firmware.

Petter Reinholdtsen pere at moszumanska.debian.org
Mon Oct 13 16:47:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit a0f9ebd2a5c0dedafe3b1311c9588d1fe9f18389
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Mon Oct 13 18:47:38 2014 +0200

    Extend auto-addfirmware to also look in dmesg for requested firmware.
---
 debian/changelog                               | 2 ++
 share/debian-edu-config/tools/auto-addfirmware | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 251633d..17920bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,6 +61,8 @@ debian-edu-config (1.810) UNRELEASED; urgency=high
   [ Petter Reinholdtsen ]
   * Rewrite init-ltsp.d/60-edu-client to disable all services the same
     way, reduce duplicate code and work with sysv-rc based systems too.
+  * Extend auto-addfirmware to also look in dmesg for requested
+    firmware.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 07 Oct 2014 12:47:06 +0200
 
diff --git a/share/debian-edu-config/tools/auto-addfirmware b/share/debian-edu-config/tools/auto-addfirmware
index 54785cb..c86011b 100644
--- a/share/debian-edu-config/tools/auto-addfirmware
+++ b/share/debian-edu-config/tools/auto-addfirmware
@@ -27,6 +27,15 @@ for fwfile in $(for module in $(awk '{print $1}' /proc/modules) ; do modinfo $mo
     fi
 done
 
+# Also look in dmesg for requested firmware for modules that refuse to
+# load without their firmware.  See also bug #725714.
+for fwfile in $(dmesg | grep 'firmware: failed' | sed 's/.*firmware: failed to load //' | cut -d" " -f1); do
+    loginfo "looking for firmware file $fwfile requested by kernel"
+    if [ ! -e /lib/firmware/$fwfile ] ; then
+        files="${files:+$files }$fwfile"
+    fi
+done
+
 if [ -z "$fwfiles" ] ; then
     loginfo "did not find any firmware files requested by loaded kernel modules.  exiting"
     exit 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list