2 Buildfixes
[people/pmueller/ipfire-2.x.git] / src / install+setup / install / probecntrl.sh
1 #!/bin/sh
2
3 echo "Probing for storage controllers"
4 for MODULE in $(hwinfo --usb --usb-ctrl --storage-ctrl | grep modprobe | awk '{ print $5 }' | tr -d \" | sort | uniq); do
5 if [ "${MODULE}" = "piix" ]; then
6 continue
7 fi
8 if grep -Eqe "^${MODULE} " /proc/modules; then
9 MODULES="${MODULES} --with=${MODULE}"
10 echo "Found: ${MODULE}"
11 fi
12 done
13
14 if [ -z "${MODULES}" ]; then
15 exit 1
16 else
17 echo "${MODULES}" > /tmp/cntrldriver
18 exit 0
19 fi