Override the hostname provided by the DHCP server (Closes: #7769).
[tails-test.git] / config / chroot_local-hooks / 51-module-assistant
blob8967a0ff4148804304957e0d921d4ac33e3dba13
1 #!/bin/sh
3 set -e
5 # Install modules managed by module-assistant
7 echo "Installing modules managed by module-assistant"
8 MODULES=""
9 MA="module-assistant --text-mode --non-inter"
11 ma_install_tools ()
13 apt-get install --yes build-essential module-assistant debhelper
14 $MA update
17 ma_install_modules ()
19 for MODULE in $@ ; do
20 for KERNEL in /boot/vmlinuz-* ; do
21 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
22 echo "module-assistant: installing module ${MODULE} for kernel ${VERSION}"
23 $MA --quiet auto-install ${MODULE} -l ${VERSION}
24 done
25 $MA clean ${MODULE}
26 apt-get --yes purge ${MODULE}
27 done
30 ma_cleanup ()
32 rm -f /usr/src/*.deb
35 if [ -n "${MODULES}" ] ; then
36 ma_install_tools
37 ma_install_modules ${MODULES}
38 ma_cleanup