Recent releases of Fedora and other GNU/Linux distributions include a Hardware Abstraction Layer (HAL) which is used to support device plug-and-play capabilities. In this post I will show you how your shell scripts can use HAL to retrieve device and system information.
The term HAL is overloaded as it used to refer both to a specification and the actual software which implements the specification. From an application developers viewpoint, HAL is way to enumerate the capabilities and features of hardware attached to a system and receive notification when something about the hardware changes.
First, a very quick overview of HAL. Each item of physical hardware in a computer is regarded as being an device object which identified by a Unique Device Identifier (UDI). Associated with each device object is a variable set of well-defined typed key-value pairs (or metadata) called device properties which describe what each device object represents together with its properties. Some device properties are derived from the actual physical hardware, some are merged from XML-formatted files, known as Device Information Files, and some are derived from the actual device configuration. Mandatory device properties are defined in the HAL specification.
A HAL

























