Hallo Forum!
Ich hab mal wieder ne Frage ;-)
Wie kann ich nen Treiber automatisch laden lassen?
Meine Situation: Ich hab nen USB-Wlan-Stick, den ich gestern endlich zum laufen gebracht habe (einige werden sich erinnern *g*). Ich muss aber den Treiber jedes Mal mit "insmod" laden und darf erst danach den Stick einstecken, da er sonst nicht korrekt erkannt wird.
Wie kann ich den Treiber also so laden, dass er vor der Erkennung des Sticks geladen wird. Bzw. wie kann ich den Standarttreiber 'verdrängen'?
Danke schonmal, Gruß CPUQuäler
PS: Ich dachte immer die Grafikkartentreiber würden so viele Probleme machen. Bisher hat der Wlan-Treiber mir mehr graue Haare beschert ;-)
Linux 15.012 Themen, 106.869 Beiträge
Du mußt mal in die manualpage von interfaces reinschauen.
Dieser pre-up Anweisung ist dazu gedacht, damit irgendein Befehl abgearbeitet wird, bevor die Netzwerkkarte aktiviert wird.
"man interfaces"
......
IFACE OPTIONS
The following "command" options are available for every family and
method. Each of these options can be given multiple times in a single
stanza, in which case the commands are executed in the order in which
they appear in the stanza. (You can ensure a command never fails by
suffixing "|| true".)
pre-up command
Run command before bringing the interface up. If this command
fails then ifup aborts, refraining from marking the interface as
configured, prints an error message, and exits with status 0.
This behavior may change in the future.
up command
post-up command
Run command after bringing the interface up. If this command
fails then ifup aborts, refraining from marking the interface as
configured (even though it has really been configured), prints
an error message, and exits with status 0. This behavior may
change in the future.
down command
pre-down command
Run command before taking the interface down. If this command
fails then ifdown aborts, marks the interface as deconfigured
(even though it has not really been deconfigured), and exits
with status 0. This behavior may change in the future.
post-down command
Run command after taking the interface down. If this command
fails then ifdown aborts, marks the interface as deconfigured,
and exits with status 0. This behavior may change in the
future.
.....
Ist ein einfaches Englisch .
Ich denke auch das die beste Konfigurationsdatei die /etc/network/interfaces ist.
Als ich damals die Allnet WLAN-Karte installiert habe, habe ich auch die ganzen Treiberangaben in die interfaces reingeschrieben.
Die Unterschiede zwischen Debian und Ubuntu sind wahrscheinlich zu groß.
Die Datei Blacklist wird wahrscheinlich vom Kernelautoloader KMOD ausgewertet. KMOD bekommt vom Kernel einen alias und lädt dann den dazu passenden Treiber mit Hilfe von modprobe.
Bei Debian steht in diesem Verzeichnis eine Datei aliases
/etc/modprobe.d$ cat aliases
# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# Please file a bug against module-init-tools if a package needs a entry
# in this file.
# network protocols ##########################################################
alias net-pf-1 unix
alias net-pf-2 ipv4
alias net-pf-3 ax25
alias net-pf-4 ipx
alias net-pf-5 appletalk
alias net-pf-6 netrom
alias net-pf-7 bridge
alias net-pf-8 atm
alias net-pf-9 x25
alias net-pf-10 ipv6
alias net-pf-11 rose
alias net-pf-12 decnet
# 13 NETBEUI
alias net-pf-15 af_key
alias net-pf-16 af_netlink
alias net-pf-17 af_packet
# 18 ASH
alias net-pf-19 af_econet
alias net-pf-20 atm
.....
Der alias wird vom Kernel an KMOD gesendet , wenn ein Programm einen bestimmten Treiber braucht. Ich nehme mal an das die Datei Blacklist eine ähnliche Funktion bei Ubuntu hat.
