#! /bin/bash LC_ALL=POSIX usage() { cat <> $tmp done rm -rf $tmpdir ;; ELF*) process_module "$file" >> $tmp ;; *) if [ -e "$file" ]; then echo "File type of $file not supported" >&2 exit 1 fi file2=$(/sbin/modinfo -F filename "${file%.ko}") if ! [ -e "$file2" ]; then echo "No module $file found" >&2 exit 1 fi process_module "$file2" >> $tmp ;; esac done if [ -n "${!processed_module_*}" ]; then echo "# Modules:" $(for m in ${!processed_module_*}; do echo ${!m}; done \ | sort -u) sort -u $tmp \ | if [ -n "$opt_combine" ]; then combine_modaliases else cat fi echo "# Generated with: ${0##*/} ${ARGS[*]}" fi # vim:softtabstop=4 shiftwidth=4