summaryrefslogtreecommitdiffstats
path: root/target/device/Atmel/atstk100x/target_skeleton/etc/init.d/S10modules-init
blob: e2cf4e3036f67c4f99b45ad79707e0a4e437b5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

MODPROBE=/sbin/modprobe

echo -n "Probing modules: "
if [ ! -x "${MODPROBE}" -o ! -f "/etc/modules" ]; then
	echo "missing"
	exit 1
else
	echo
fi

grep '^[^#]' "/etc/modules" | \
while read module args; do
	[ "$module" ] || continue
	if ${MODPROBE} $module $args; then
		echo "  $module loaded"
	else
		echo "  $module failed"
	fi
done