[#] Jakie moduły jądra mam dostępne i do czego służą?

( Ostatnio zmieniony wt., 17/06/2008 - 00:11 )
 

mod_list.sh

#! /bin/bash
#
# mod_list.sh 0.1 2005/04/19 10:05:26 (Rafal Zajac)
#
# Sacript to generate list available kernel modules with
# descrptions.
#
# Downloaded from http://slackware.asmonet.net/
#
# Copyright (C) 2005 Rafal Zajac <rzajac{at}gmail{dot}com>
# Released under the GPL v2 only.

# Config
OUTPUT_DEF=~/modules.txt
MODPROBE=`cat /proc/sys/kernel/modprobe`
MODINFO=`which modinfo`
BASENAME=`which basename`
GREP=`which grep`

if [ "$MODPROBE" = "" ] || [ "$BASENAME" = "" ] || [ "$GREP" = "" ] || [ "$MODINFO" = "" ]; then
  echo "You must have modprobe, modinfo, basename, grep to run this script"
  exit 1
fi


if [ $# -gt 2 ]; then
  echo
  echo " Usage: $0 [-v] path"
  echo "   -v  : verbose mode"
  echo "  path : path to the output file."
  exit 1
fi

# Check arguments

if [ "$#" = 2 ]  && [ "$1" = "-v" ]; then
  OUTPUT_DEF=$2
fi

if [ "$#" = 1 ] && [ "$1" != "-v" ]; then
  OUTPUT_DEF=$1
fi

echo
echo "Generateing available kernel modules listing with descriptions to file $OUTPUT_DEF"
echo "   Copyright (C) 2005 Rafal Zajac <rzajac{at}gmail{dot}com>"
echo "   Downloaded from http://www.slackware.prv.pl"

# Errase old listing
rm -f $OUTPUT

# Make listing

for mod in $($MODPROBE -l); do
  echo $($BASENAME $mod) >> $OUTPUT_DEF
  echo -n "     " >> $OUTPUT_DEF
  modinfo $mod | $GREP description: >> $OUTPUT_DEF
  echo >> $OUTPUT_DEF
  if [ "$1" = "-v" ]; then
    echo $(basename $mod)
  fi
done

źródło: http://slackware.asmonet.net/

Przykładowy plik opisowy modułów:

drbd.ko
     description:    drbd - Distributed Replicated Block Device v8.0.11

iscsi_trgt.ko

cx88-alsa.ko
     description:    ALSA driver module for cx2388x based TV cards

quickcam.ko
     description:    Logitech QuickCam USB driver

stk11xx.ko
     description:    Syntek USB Video Camera

ov511.ko
     description:    ov511 USB Camera Driver
5
Twoja ocena: Brak Średnio: 5 (1 vote)