ath9k-hmac/backports-3.12.8-1/scripts/mod_helpers.sh
2016-09-27 13:31:22 +02:00

12 lines
224 B
Bash
Executable File

function mod_filename()
{
which modinfo > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
MOD_QUERY="modinfo -F filename"
else
MOD_QUERY="modprobe -l"
fi
mod_path="$($MOD_QUERY $1 | tail -1)"
echo $(basename "$mod_path")
}