UDEV(7) udev UDEV(7) udev - udev /dev/ . . . udev systemd-udevd.service(8) uevents . udev . udev . udev udev . libudev . udev /usr/lib/udev/rules.d /usr/local/lib/udev/rules.d /run/udev/rules.d /etc/udev/rules.d. . . /etc/ /run/ /usr/. /etc/ /usr/lib/ /dev/null . .rules . - . "#" . : . . . --. . "==" . ( .) "!=" . ( .) "=" . . "+=" . "-=" . 217. ":=" . 247. ("string"). (") (\"). . "\t\n" : t n . e (e"string\n") C Escape sequences in C[1]. e"string\n" 7 : 6 . . i (i"string") . i"foo" "foo" "FOO" "FoO" . ("==") ("!=") ATTR{foo}==i"abcd". NUL . . sysfs . . ACTION . DEVPATH devpath . KERNEL . KERNELS . NAME . NAME . SYMLINK . SYMLINK . . "!=" . SUBSYSTEM . SUBSYSTEMS . DRIVER . . DRIVERS . ATTR{filename} sysfs . . ATTRS{filename} sysfs . ATTRS . . SYSCTL{_} . 240. ENV{key} . CONST{key} . : "arch" . ConditionArchitecture= systemd.unit(5) . 244. "virt" . systemd-detect-virt(1) . 244. "cvm" . systemd-detect-virt(1) . 254. . 244. TAG . TAG . . "!=" . TAGS . "!=" . TEST{octal mode mask} . . PROGRAM . . RESULT. . RUN. PROGRAM "=" ":=" "+=" "==". RESULT PROGRAM. PROGRAM. glob shell . : "*" . "" . "[]" . "tty[SR]" "ttyS" "ttyR". "-". "[0-9]". "[" "!" . "|" . "abc|x*" "abc" "x*". 217. : NAME . systemd.link(5) . udev . SYMLINK . . . "0-9A-Za-z#+-.:=@_/" UTF-8 "\x00". "_" . . link_priority. link_priority . link_priority ( ) . . OWNER GROUP MODE . . SECLABEL{module} . 209. ATTR{key} sysfs . SYSCTL{_} . 220. ENV{key} . "." ( PROGRAM). TAG . libudev . . . . RUN{type} . "+=" "=" ":=" . "program" "builtin" ":=" "=" . type : "program" . /usr/lib/udev . type. "" program . 199. . . . . / udev systemd-udevd.service. . udev udev SYSTEMD_WANTS. systemd.device(5) . LABEL GOTO . GOTO LABEL . {} type: "program" . / RUN. 199. "" "program" . 199. "file" . "db" . . "cmdline" . "1". "parent" . IMPORT{parent} ( glob ). . RUN. IMPORT{} "=" ":=" "+=" "==". "!=" . : link_priority= . . 0. string_escape=none|replace "" NAME SYMLINK ENV{}. " " . NAME SYMLINK ENV{}. . static_node= . /run/udev/static_node-tags/ . systemd-tmpfiles systemd-udevd. . watch inotify uevent . nowatch inotify. db_persist ( ) udev . udevadm info --cleanup-db. ( Device Mapper) initrd. 241. log_level=level "debug" "info" "reset". . "reset" . systemd-udevd. . . 00-debug.rules. uevent : # /etc/udev/rules.d/00-debug-net.rules SUBSYSTEM=="net", OPTIONS="log_level=debug" 248. dump . udev . 258. dump-json dump JSON. 259. ENV GROUP MODE NAME OWNER PROGRAM RUN SECLABEL SYMLINK . RUN . . : $kernel, %k . $number, %n . "sda3" 3. $devpath, %p (devpath) . $id, %b SUBSYSTEMS KERNELS DRIVERS ATTRS. $driver SUBSYSTEMS KERNELS DRIVERS ATTRS. $attr{file}, %s{file} sysfs . KERNELS SUBSYSTEMS DRIVERS ATTRS . . $env{key}, %E{key} . $major, %M . $minor, %m . $result, %c PROGRAM. : "%c{N}". "+" : "%c{N+}". $parent, %P . $name . . $links . . $root, %r udev_root. $sys, %S sysfs. $devnode, %N . %% "%" . $$ "$" . systemd-udevd.service(8), udevadm(8), systemd.link(5) 1. C https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences 3 . . : . systemd 260.2 UDEV(7)