summaryrefslogtreecommitdiff
path: root/examples/hooks/madwifi.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hooks/madwifi.sh')
-rwxr-xr-xexamples/hooks/madwifi.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/hooks/madwifi.sh b/examples/hooks/madwifi.sh
index 178de8829..bc5d07289 100755
--- a/examples/hooks/madwifi.sh
+++ b/examples/hooks/madwifi.sh
@@ -5,13 +5,18 @@
#
# Note: This hook requires packages from the contrib section. Make sure you enabled
# it in your configuration.
-#
-# FIXME: it runs in interactive mode
# Building kernel module
which module-assistant || apt-get install --yes module-assistant
module-assistant update
-module-assistant auto-install madwifi
+
+for KERNEL in /boot/vmlinuz-*
+do
+ VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
+
+ module-assistant --non-inter --quiet auto-install madwifi -l ${VERSION}
+done
+
module-assistant clean madwifi
# Installing additional stuff