# genkernel mdev.conf # Syntax: # [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] # [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] # [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] # # [-]: do not stop on this match, continue reading mdev.conf # =: move, >: move and create a symlink # !: do not create device node # @|$|*: run@cmd if $ACTION=add, $cmd if $ACTION=remove, *cmd in all cases # null may already exist; therefore ownership has to be changed with command null 0:0 666 @chmod 666 $MDEV zero 0:0 666 full 0:0 666 random 0:0 444 urandom 0:0 444 hwrandom 0:0 444 hw_random 0:0 600 =hwrng # console may already exist; therefore ownership has to be changed with command console 0:5 600 @chmod 600 $MDEV # Typical devices tty 0:5 666 tty[0-9]* 0:5 660 ttyS[0-9]* 0:14 660 # block devices nvme[0-9]n[0-9].* 0:6 660 @/etc/mdev/helpers/nvme sd[a-z].* 0:6 660 @/etc/mdev/helpers/storage-device vd[a-z].* 0:6 660 @/etc/mdev/helpers/storage-device # raid controllers cciss!(.*) 0:6 660 =cciss/%1 ida!(.*) 0:6 660 =ida/%1 rd!(.*) 0:6 660 =rd/%1 fuse 0:0 666