
{"id":6334,"date":"2011-12-01T19:27:16","date_gmt":"2011-12-01T19:27:16","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6334"},"modified":"2011-12-01T19:27:16","modified_gmt":"2011-12-01T19:27:16","slug":"udev-linux-dynamic-device-management","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/12\/01\/udev-linux-dynamic-device-management\/","title":{"rendered":"udev &#8211; Linux dynamic device management"},"content":{"rendered":"<p><u>ABOUT UDEV<\/u><\/p>\n<pre>\nudev - Linux dynamic device management\nudev (userspace \/dev) is a device manager for the Linux kernel\n<\/pre>\n<p><u>CONFIG FILE RELATED<\/u><\/p>\n<pre>\n# do not edit this file, it will be overwritten on update\n\nACTION==\"remove\", GOTO=\"cdrom_end\"\nSUBSYSTEM!=\"block\", GOTO=\"cdrom_end\"\nKERNEL!=\"sr[0-9]*|xvd*\", GOTO=\"cdrom_end\"\nENV{DEVTYPE}!=\"disk\", GOTO=\"cdrom_end\"\n\n# unconditionally tag device as CDROM\nKERNEL==\"sr[0-9]*\", ENV{ID_CDROM}=\"1\"\n\n# media eject button pressed\nENV{DISK_EJECT_REQUEST}==\"?*\", RUN+=\"cdrom_id --eject-media $tempnode\", GOTO=\"cdrom_end\"\n\n# import device and media properties and lock tray to\n# enable the receiving of media eject button events\nIMPORT{program}=\"cdrom_id --lock-media $tempnode\"\n\nLABEL=\"cdrom_end\"\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n\"\/lib\/udev\/rules.d\/60-cdrom_id.rules\" [readonly] 18L, 584C                                  1,3           All\n\n<\/pre>\n<p><u>RELATED SHELL SESSION (cdrom)<\/u><\/p>\n<p>[bash]<br \/>\n$cat \/proc\/sys\/dev\/cdrom\/info<br \/>\nCD-ROM information, Id: cdrom.c 3.20 2003\/12\/17<\/p>\n<p>drive name:\t\tsr0<br \/>\ndrive speed:\t\t48<br \/>\ndrive # of slots:\t1<br \/>\nCan close tray:\t\t1<br \/>\nCan open tray:\t\t1<br \/>\nCan lock tray:\t\t1<br \/>\nCan change speed:\t1<br \/>\nCan select disk:\t0<br \/>\nCan read multisession:\t1<br \/>\nCan read MCN:\t\t1<br \/>\nReports media changed:\t1<br \/>\nCan play audio:\t\t1<br \/>\nCan write CD-R:\t\t1<br \/>\nCan write CD-RW:\t1<br \/>\nCan read DVD:\t\t1<br \/>\nCan write DVD-R:\t1<br \/>\nCan write DVD-RAM:\t1<br \/>\nCan read MRW:\t\t1<br \/>\nCan write MRW:\t\t1<br \/>\nCan write RAM:\t\t1<\/p>\n<p>$<\/p>\n<p>[\/bash]<\/p>\n<p><u>FROM MANUAL<\/u><\/p>\n<pre>\nudev  supplies  the system  software  with  device events,  manages permissions of  device nodes and\nmay create  additional symlinks in the  \/dev  directory, or  renames  network  interfaces. The  kernel\nusually just assigns unpredictable  device names based on the order of discovery. Meaningful symlinks\nor network device names provide away to reliably  identify  devices based  on  their properties  or\ncurrent configuration. The udev  daemon, udevd(8),  receives device uevents  directly from the kernel \nwhenever  a device is added or  removed from the system, or  it changes its  state. When  udev receives\na device  event, it matches  its  configured  set   of  rules  against  various  device attributes  to\nidentify the  device. Rules  that match  may provide additional device information to be  stored in the\nudev database or to be used to create meaningful symlink names. All  device  in formation  udev  processes\nis stored  in  the  udev database and sent out to  possible event subscribers. Access to all stored  data\nand  the  event  sources is  provided  by the  library libudev.  \n\nsource: Manual\n<\/pre>\n<p>LINKS <br \/>\n<a href=\"https:\/\/www.linux.com\/news\/udev-introduction-device-management-modern-linux-system\">https:\/\/www.linux.com\/news\/udev-introduction-device-management-modern-linux-system<\/a><br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Udev\">https:\/\/en.wikipedia.org\/wiki\/Udev<\/a><br \/>\n<a href=\"https:\/\/www.thegeekdiary.com\/beginners-guide-to-udev-in-linux\/\">https:\/\/www.thegeekdiary.com\/beginners-guide-to-udev-in-linux\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT UDEV udev &#8211; Linux dynamic device management udev (userspace \/dev) is a device manager for the Linux kernel CONFIG FILE RELATED # do not edit this file, it will be overwritten on update ACTION==&#8221;remove&#8221;, GOTO=&#8221;cdrom_end&#8221; SUBSYSTEM!=&#8221;block&#8221;, GOTO=&#8221;cdrom_end&#8221; KERNEL!=&#8221;sr[0-9]*|xvd*&#8221;, GOTO=&#8221;cdrom_end&#8221; ENV{DEVTYPE}!=&#8221;disk&#8221;, GOTO=&#8221;cdrom_end&#8221; # unconditionally tag device as CDROM KERNEL==&#8221;sr[0-9]*&#8221;, ENV{ID_CDROM}=&#8221;1&#8243; # media eject button pressed &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/12\/01\/udev-linux-dynamic-device-management\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;udev &#8211; Linux dynamic device management&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[1613],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6334"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6334"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6334\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}