rngd: update initskript and add hwrngtty support
[ipfire-2.x.git] / config / udev / 90-hwrng.rules
CommitLineData
56726ed9
AF
1# do not edit this file, it will be overwritten on update
2
3SUBSYSTEM!="tty", GOTO="ipfire_hwrng_end"
4KERNEL!="ttyACM[0-9]*", GOTO="ipfire_hwrng_end"
5
6SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"
7
8IMPORT{builtin}="usb_id"
9ENV{ID_SERIAL}=="", GOTO="ipfire_hwrng_end"
10SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
11ENV{ID_USB_INTERFACE_NUM}=="", GOTO="ipfire_hwrng_end"
12
13ATTRS{manufacturer}=="IPFire.org", ATTRS{product}=="Random Number Generator*", ENV{.ID_PORT}=="", SYMLINK+="hwrngtty" RUN+="/bin/stty raw -echo -ixoff -F /dev/hwrngtty 115200" RUN+="/etc/rc.d/init.d/rngd udev-event"
14
15LABEL="ipfire_hwrng_end"
2af81793 16ACTION=="add|remove", KERNEL=="hw_random", RUN+="/etc/rc.d/init.d/rngd udev-event"