[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#593108: hw-detect: Install mmc-modules automatically if needed



Package: hw-detect
Severity: minor
Tags: patch

Some devices don't have a hard drive.
Instead of manually specifying modules for each device, it might be possible to
guess which device needs additional modules.

This patch implements one way to do this, by installing mmc-modules if no disk
are found.



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (120, 'unstable'), (105, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-rc3+ (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From c784989b10d3e72601e59a8c73723166684fd12d Mon Sep 17 00:00:00 2001
From: Thibaut Girka <thib@sitedethib.com>
Date: Sun, 15 Aug 2010 13:30:38 +0200
Subject: [PATCH 1/9] hw-detect: install mmc-modules if no disks are found

---
 packages/hw-detect/hw-detect.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/packages/hw-detect/hw-detect.sh b/packages/hw-detect/hw-detect.sh
index 3e49a42..32483c9 100755
--- a/packages/hw-detect/hw-detect.sh
+++ b/packages/hw-detect/hw-detect.sh
@@ -29,6 +29,13 @@ if [ -d /sys/bus/pci/devices ] && \
 	anna-install virtio-modules || true
 fi
 
+# Install mmc modules if no other disks are found
+# (ex: embedded device with µSD storage)
+# TODO: more checks? move that to disk-detect?
+if [ -z "$(list-devices disk)" ]; then
+	anna-install mmc-modules || true
+fi
+
 if [ -x /sbin/depmod ]; then
 	depmod -a > /dev/null 2>&1 || true
 fi
-- 
1.7.1


Reply to: