[debian-edu-commits] r81239 - in branches/wheezy/debian-edu-config: debian share/debian-edu-config/tools
pere at alioth.debian.org
pere at alioth.debian.org
Fri Jun 28 14:23:31 UTC 2013
Author: pere
Date: 2013-06-28 14:23:31 +0000 (Fri, 28 Jun 2013)
New Revision: 81239
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/share/debian-edu-config/tools/auto-addfirmware
Log:
Make sure auto-addfirmware check the Contents files for contrib and non-free looking for firmware.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-06-28 12:18:40 UTC (rev 81238)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-06-28 14:23:31 UTC (rev 81239)
@@ -10,7 +10,8 @@
debian-installer-7.0-netboot-amd64 packages.
* Adjust auto-addfirmware and make sure to add contrib and non-free
when trying to install the firmware-b43-installer package on
- machines needing it.
+ machines needing it. Also make sure it check the Contents files
+ for contrib and non-free looking for firmware.
* Move code in 032-edu-pkgs removing the force-unsafe-io dpkg flag
to after the workstation is configured, to ensure it have effect for
most of the LTSP installation period.
Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/auto-addfirmware
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/auto-addfirmware 2013-06-28 12:18:40 UTC (rev 81238)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/auto-addfirmware 2013-06-28 14:23:31 UTC (rev 81239)
@@ -3,9 +3,6 @@
# Find missing firmware files requested by the kernel, and install the
# binary packages with the files from the non-free section.
-tmpdir=$(mktemp -d)
-cd $tmpdir || exit 1
-
dist=$(lsb_release -cs)
arch=$(dpkg --print-architecture)
mirror=http://http.debian.net/debian
@@ -27,21 +24,36 @@
if [ -z "$fwfiles" ] ; then
echo "info: did not find any firmware files requested by loaded kernel modules. exiting"
- exit
+ exit 1
fi
echo "info: kernel drivers requested extra firmware:" $fwfiles
+tmpdir=$(mktemp -d)
+cd $tmpdir || exit 1
-url="$mirror/dists/$dist/Contents-$arch.gz"
-echo "info: fetching $url"
-GET $url | gunzip | grep ^lib/firmware > Fw-Contents-$arch
+cleanup() {
+ cd /
+# rm -rf $tmpdir
+ echo $tmpdir
+}
+# "" is main in Wheezy.
+for section in "" "contrib" "non-free"; do
+ if [ -z "$section" ] ; then
+ url="$mirror/dists/$dist/Contents-$arch.gz"
+ else
+ url="$mirror/dists/$dist/$section/Contents-$arch.gz"
+ fi
+ echo "info: fetching $url"
+ GET $url | gunzip | grep ^lib/firmware > Fw-Contents-$arch$section
+done
+
echo "info: locating packages with the requested firmware files"
binpkginfos=""
binpkgs=""
for fwfile in $fwfiles ; do
fwfilere=$(echo $fwfile | sed -e 's%/%\\/%g' -e 's/\./\\./g')
- binpkginfo="$(awk "/^lib\/firmware\/$fwfilere/ {print \$2}" Fw-Contents-$arch)"
+ binpkginfo="$(awk "/^lib\/firmware\/$fwfilere/ {print \$2}" Fw-Contents-$arch*)"
if [ -z "$binpkginfo" ] ; then
# Special case for b43 where the firmware is undistributable
# by Debian.
@@ -80,5 +92,4 @@
else
echo "info: No new firmware package with requested firmware detected."
fi
-cd /
-rm -rf $tmpdir
+cleanup
More information about the debian-edu-commits
mailing list