--- packages/hw-detect/debian/changelog | 6 ++++++ packages/hw-detect/hw-detect.sh | 11 +++++++++++ 2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/packages/hw-detect/debian/changelog b/packages/hw-detect/debian/changelog index 8cac812..ac6bbe2 100644 --- a/packages/hw-detect/debian/changelog +++ b/packages/hw-detect/debian/changelog @@ -1,3 +1,9 @@ +hw-detect (1.66) UNRELEASED; urgency=low + + * Queue atl2-modules for installation if it is in use. + + -- Otavio Salvador <[EMAIL PROTECTED]> Sat, 02 Aug 2008 14:21:19 -0300 + hw-detect (1.65) unstable; urgency=low [ Joey Hess ] diff --git a/packages/hw-detect/hw-detect.sh b/packages/hw-detect/hw-detect.sh index 302ea4d..84fc760 100755 --- a/packages/hw-detect/hw-detect.sh +++ b/packages/hw-detect/hw-detect.sh @@ -14,6 +14,8 @@ NEWLINE=" " MISSING_MODULES_LIST="" SUBARCH="$(archdetect)" +KERNEL_MAJOR="$(uname -r | cut -d . -f 1,2)" +KERNEL_FLAVOUR="$(uname -r | cut -d - -f 3-)" finish_install=/usr/lib/finish-install.d/30hw-detect @@ -35,6 +37,10 @@ is_not_loaded() { (cut -d" " -f1 /proc/modules | sed -e 's/_/-/g' | grep -q "^$1\$")) } +is_loaded() { + ! (is_not_loaded "$1") +} + is_available () { [ "$(modprobe -l $1)" ] || return 1 } @@ -529,6 +535,11 @@ case "$(udpkg --print-architecture)" in ;; esac +# Install atl2-modules if it is in use +if is_loaded "atl2"; then + apt-install atl2-modules-$KERNEL_MAJOR-$KERNEL_FLAVOUR +fi + # Some hardware may need extra time to initialize: # megaraid_mbox hardware RAID -- 1.6.0.rc1.34.g0fe8c -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]