|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SOA World Conference
Virtualization Conference $50 Savings Expire June 24, 2008... – Register Today!
SYS-CON.TV SYS-CON.TV WEBCASTS |
TOP LINKS YOU MUST CLICK ON Trends
Linux.SYS-CON.com: Device Management with udev and HAL on Fedora Core 4
Hotplugging everything on Fedora Core 4
By: Richard Petersen
Oct. 22, 2005 06:00 PM
Digg This!
Page 2 of 2
« previous page
This situation can be confusing because symbolic links can be created for devices that are not yet generated. The symbolic links will be defined and held until needed, when the device is generated. This is why you usually have many more SYMLINK rules than NAME rules, though the NAME rules actually set up device files. In the case of removable devices, devices will not have a device name generated until they are connected. In the 50-rules.udev file you will find numerous SYMLINK rules for optical devices like the one shown here for SCSI CD-ROMs: KERNEL="scd[0-9]*", SYMLINK="cdrom%e" In most cases, you'll only need symbolic links for devices, using the official symbolic names. Most of these are already defined for you. Should you need to create a symbolic link, you can create a SYMLINK rule for it. However, a new SYMLINK rule needs to be placed before the name rules that name that device. The SYMLINK rules for a device are read by udev and kept until a device is named. Then those symbolic names can be used for that device. You can have as many symbolic links for the same device as you want, meaning that you could have several SYMLINK rules for the same device. When the NAME rule for the device is encountered, the previous SYMLINK keys are simply appended. Most standard symbolic names are already defined in the 50-udev.rules file, such as audio for the audio device. In the following example, the device is referenced by its KERNEL key and the symbolic link is applied with SYMLINK key. This is only a SYMLINK rule. There is no NAME key to name the device: KERNEL="audio0", SYMLINK="audio"
Hardware Abstraction Layer: HAL HAL makes devices easily available to desktops and applications using a D-BUS, device bus, structure. Device are managed as objects that applications can easily access. The D-BUS service is provided by the HAL daemon, haldaemon. Interaction with the device object is provided by the org.freedesktop.HAL service, which is managed by the /org/freedesktop/HAL/Manager. HAL is an information service for devices. The HAL daemon maintains a dynamic database of connected hardware devices. In certain cases, this information can be used by specialized callout programs to maintain certain device configuration files. This is the case with removable file systems like CD-ROMs and USB card readers. HAL will invoke the fstab-sync callout program that will use HAL information to dynamically change managed entries in the fstab file. Removable devices are managed by fstab-sync with HAL information, telling fstab-sync when such disks are attached. The situation can be confusing. Callout programs perform the actual tasks, but HAL provides the device information. For example, though fstab-sync changes the fstab file, the options and mountpoints used for CD-ROM entries are specified in HAL device information files that set policies for storage management.
Device Information Files: fdi There are currently three device information file directories set up in the device information file directories, each for different kinds of information: information, policy, and preprobe.
Both udev and HAL usher in a radical new age of device management for Linux systems, Fedora Core in particular. As more devices become hotplugged, temporarily attached like a camera or moving from one system to another like small printers, it's crucial that device management become accommodating, automating device detection and configuration. It used to be that devices were few and rare, with only a couple used for any given system. These days numerous devices of all kinds are expected to connect and interact with your system. The old method of manually setting up a device interface is no longer practical. We are in an era where all devices are logically hotplugged, and fixed devices are just hotplugged ones that were never removed. References
Page 2 of 2 « previous page
LATEST LINUX STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||