Package: firmware-b43legacy-installer
Version: 1:015-8
Severity: normal
Tags: patch

The addition of chroot-supporting code in -8 was welcome, but it
misses the point.

The idea is to unconditionally install the firmwares when a chroot
environment is detected, skipping verification of the presence of
a supported chip, just like every other firmware*.postinst script in
this source package does.

The attached patch makes firmware-b43legacy-installer.postinst act
consistently with the other firmware-*-installer binary packages from
this source package.

Cheers,
--
  intrigeri <[email protected]>
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc
  | So what?

>From 6d46fddc7334f600ab411e27ec90f8ef29ca71b1 Mon Sep 17 00:00:00 2001
From: intrigeri <[email protected]>
Date: Sat, 26 Nov 2011 15:27:30 +0100
Subject: [PATCH] Unconditionally install b43legacy firmwares in chroot
 environment.

i.e. do exactly the same as the other postinst scripts in this source
package do.
---
 debian/firmware-b43legacy-installer.postinst |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/debian/firmware-b43legacy-installer.postinst b/debian/firmware-b43legacy-installer.postinst
index 1727c85..a4762f2 100644
--- a/debian/firmware-b43legacy-installer.postinst
+++ b/debian/firmware-b43legacy-installer.postinst
@@ -38,6 +38,17 @@ b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta-3.130.20.0.o
 rm -rf $tmp
 }
 
+# check environment
+if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
+ then
+    echo "A chroot environment has been detected."
+    echo "Remember this firmware needs kernel >= 2.6.25."
+    latest_firmware
+    exit 0
+ else
+    echo "No chroot environment found. Starting normal installation"
+fi
+
 # check chip
 supported=0
 pci=`lspci -n | grep -o "14e4:[1234567890abcdef]\+"` || true
@@ -59,16 +70,6 @@ if [ "$supported" = 0 ]; then
         exit 0
 fi
 
-# check environment
-if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
- then
-    echo "A chroot environment has been detected."
-    echo "Remember this firmware needs kernel >= 2.6.25."
-    latest_firmware
-    exit 0
- else
-    echo "No chroot environment found. Starting normal installation"
-    latest_firmware
-fi
+latest_firmware
 
 #DEBHELPER#
-- 
1.7.7.1

Reply via email to