Re: udev hotplug Verständnisfrage
Hallo,
Am Mittwoch, den 26.10.2005, 22:20 +0200 schrieb Frank Ehlert:
> Moin,
> erstmal vielen Dank. Ich komme der Lösung näher. Ich habe eine neue udev
> rule erstellt in /etc/udev/rules.d/011_eigene.rules
>
> mit folgendem Inhalt
>
> # HP Laserjet 1000 eintragen einmal mit Kernelnamen und einmal als hplj1000
>
> BUS="usb", SYSFS{idVendor}="03f0", SYSFS{product}="hp LaserJet
> 1000",NAME="usb/%k", SYMLINK="hplj1000"
>
> Diese Regel wird auch erfolgreich ausgeführt:
>
> /dev/usb/lp0 und
> /dev/hplj100
>
> werden erstellt.
>
> Ich habe ein funktionierendes (wenn ich es im Terminal aufrufe wird die
> Firmware hochgeladen) hotplug script mit dem Namen
>
> /etc/hotplug/usb/hplj1000
>
> Wo muss jetzt das Hotplug script hin?
>
aus man udev:
After device node creation, removal, or network device renaming,
udev executes the programs located in the directory
tree under /etc/dev.d/. The name of a program must have the
suffix .dev to be recognized.
In addition to the hotplug environment variables, UDEV_LOG is
set if udev is configured to use the syslog facility.
Executed programs may want to follow that setting. DEVNAME is
exported to make the name of the created node, or the
name the network device is renamed to, available to the executed
program. The programs in every directory are sorted
in lexical order, while the directories are searched in the
following order:
/etc/dev.d/$(DEVNAME)/*.dev
/etc/dev.d/$(SUBSYSTEM)/*.dev
/etc/dev.d/default/*.dev
Ich habe mir letztens ein Script /etc/dev.d/ttyPocketPC/ttyPocketPC.dev
angelegt, allerdings ist ttyPocketPC der vergebene Gerätename und nicht
ein Link darauf. Wie das mit Namen "usb/%k" funktioniert, weiß ich
nicht. Wie wäre es, hplj100 direkt als Namen zu vergeben?
Grüße,
Ulli
Reply to: