New device wiring option
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Apr 15 05:17:23 UTC 2021
--------
Bjoern A. Zeeb writes:
> Probably USB as well? Having 10 serial consoles on USB Hubs and unplugging
> one “early” one it is easy to end up re-numbering the entire chain after a
> reboot. Not sure if this really fits into your problem/implementation domain.
My solution to that specific problem is the following entry in /etc/devd:
attach 500 {
match "device-name" "uftdi[0-9]*";
match "vendor" "0x0403";
match "product" "(0x6001|0x6015)";
action "ln -fs /dev/cua$ttyname /dev/cua_$sernum";
};
notify 500 {
match "system" "USB";
match "subsystem" "DEVICE";
match "type" "DETACH";
match "vendor" "0x0403";
match "product" "(0x6001|0x6015)";
action "rm -f /dev/cua_$sernum";
};
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list